| bus-internal.h | | bus-internal.h | |
| | | | |
| skipping to change at line 35 | | skipping to change at line 35 | |
| #include <sys/un.h> | | #include <sys/un.h> | |
| #include <netinet/in.h> | | #include <netinet/in.h> | |
| | | | |
| #include "hashmap.h" | | #include "hashmap.h" | |
| #include "prioq.h" | | #include "prioq.h" | |
| #include "list.h" | | #include "list.h" | |
| #include "util.h" | | #include "util.h" | |
| | | | |
| #include "sd-bus.h" | | #include "sd-bus.h" | |
| #include "bus-error.h" | | #include "bus-error.h" | |
|
| | | #include "bus-match.h" | |
| | | | |
| struct reply_callback { | | struct reply_callback { | |
|
| sd_message_handler_t callback; | | sd_bus_message_handler_t callback; | |
| void *userdata; | | void *userdata; | |
| usec_t timeout; | | usec_t timeout; | |
| uint64_t serial; | | uint64_t serial; | |
| unsigned prioq_idx; | | unsigned prioq_idx; | |
| }; | | }; | |
| | | | |
| struct filter_callback { | | struct filter_callback { | |
|
| sd_message_handler_t callback; | | sd_bus_message_handler_t callback; | |
| void *userdata; | | void *userdata; | |
| | | | |
|
| | | unsigned last_iteration; | |
| | | | |
| LIST_FIELDS(struct filter_callback, callbacks); | | LIST_FIELDS(struct filter_callback, callbacks); | |
| }; | | }; | |
| | | | |
| struct object_callback { | | struct object_callback { | |
|
| sd_message_handler_t callback; | | sd_bus_message_handler_t callback; | |
| void *userdata; | | void *userdata; | |
| | | | |
| char *path; | | char *path; | |
| bool is_fallback; | | bool is_fallback; | |
|
| | | | |
| | | unsigned last_iteration; | |
| }; | | }; | |
| | | | |
| enum bus_state { | | enum bus_state { | |
| BUS_UNSET, | | BUS_UNSET, | |
| BUS_OPENING, | | BUS_OPENING, | |
| BUS_AUTHENTICATING, | | BUS_AUTHENTICATING, | |
| BUS_HELLO, | | BUS_HELLO, | |
| BUS_RUNNING | | BUS_RUNNING | |
| }; | | }; | |
| | | | |
|
| | | enum bus_auth { | |
| | | _BUS_AUTH_INVALID, | |
| | | BUS_AUTH_EXTERNAL, | |
| | | BUS_AUTH_ANONYMOUS | |
| | | }; | |
| | | | |
| struct sd_bus { | | struct sd_bus { | |
| unsigned n_ref; | | unsigned n_ref; | |
| enum bus_state state; | | enum bus_state state; | |
|
| int fd; | | int input_fd, output_fd; | |
| int message_version; | | int message_version; | |
| | | | |
| bool negotiate_fds:1; | | bool negotiate_fds:1; | |
| bool can_fds:1; | | bool can_fds:1; | |
| bool bus_client:1; | | bool bus_client:1; | |
| bool ucred_valid:1; | | bool ucred_valid:1; | |
|
| | | bool is_server:1; | |
| | | bool anonymous_auth:1; | |
| | | bool prefer_readv:1; | |
| | | bool prefer_writev:1; | |
| | | bool processing:1; | |
| | | bool match_callbacks_modified:1; | |
| | | bool filter_callbacks_modified:1; | |
| | | bool object_callbacks_modified:1; | |
| | | | |
| void *rbuffer; | | void *rbuffer; | |
| size_t rbuffer_size; | | size_t rbuffer_size; | |
| | | | |
| sd_bus_message **rqueue; | | sd_bus_message **rqueue; | |
| unsigned rqueue_size; | | unsigned rqueue_size; | |
| | | | |
| sd_bus_message **wqueue; | | sd_bus_message **wqueue; | |
| unsigned wqueue_size; | | unsigned wqueue_size; | |
| size_t windex; | | size_t windex; | |
| | | | |
| uint64_t serial; | | uint64_t serial; | |
| | | | |
| char *unique_name; | | char *unique_name; | |
| | | | |
|
| | | struct bus_match_node match_callbacks; | |
| Prioq *reply_callbacks_prioq; | | Prioq *reply_callbacks_prioq; | |
| Hashmap *reply_callbacks; | | Hashmap *reply_callbacks; | |
| LIST_HEAD(struct filter_callback, filter_callbacks); | | LIST_HEAD(struct filter_callback, filter_callbacks); | |
| Hashmap *object_callbacks; | | Hashmap *object_callbacks; | |
| | | | |
| union { | | union { | |
| struct sockaddr sa; | | struct sockaddr sa; | |
| struct sockaddr_un un; | | struct sockaddr_un un; | |
| struct sockaddr_in in; | | struct sockaddr_in in; | |
| struct sockaddr_in6 in6; | | struct sockaddr_in6 in6; | |
| } sockaddr; | | } sockaddr; | |
| socklen_t sockaddr_size; | | socklen_t sockaddr_size; | |
| | | | |
|
| sd_id128_t peer; | | sd_id128_t server_id; | |
| | | | |
| char *address; | | char *address; | |
| unsigned address_index; | | unsigned address_index; | |
| | | | |
| int last_connect_error; | | int last_connect_error; | |
| | | | |
|
| | | enum bus_auth auth; | |
| | | size_t auth_rbegin; | |
| struct iovec auth_iovec[3]; | | struct iovec auth_iovec[3]; | |
| unsigned auth_index; | | unsigned auth_index; | |
|
| size_t auth_size; | | char *auth_buffer; | |
| char *auth_uid; | | | |
| usec_t auth_timeout; | | usec_t auth_timeout; | |
| | | | |
| struct ucred ucred; | | struct ucred ucred; | |
| char label[NAME_MAX]; | | char label[NAME_MAX]; | |
| | | | |
| int *fds; | | int *fds; | |
| unsigned n_fds; | | unsigned n_fds; | |
| | | | |
| char *exec_path; | | char *exec_path; | |
| char **exec_argv; | | char **exec_argv; | |
|
| | | | |
| | | uint64_t hello_serial; | |
| | | unsigned iteration_counter; | |
| }; | | }; | |
| | | | |
| static inline void bus_unrefp(sd_bus **b) { | | static inline void bus_unrefp(sd_bus **b) { | |
| sd_bus_unref(*b); | | sd_bus_unref(*b); | |
| } | | } | |
| | | | |
| #define _cleanup_bus_unref_ __attribute__((cleanup(bus_unrefp))) | | #define _cleanup_bus_unref_ __attribute__((cleanup(bus_unrefp))) | |
| #define _cleanup_bus_error_free_ __attribute__((cleanup(sd_bus_error_free))
) | | #define _cleanup_bus_error_free_ __attribute__((cleanup(sd_bus_error_free))
) | |
| | | | |
| #define BUS_DEFAULT_TIMEOUT ((usec_t) (25 * USEC_PER_SEC)) | | #define BUS_DEFAULT_TIMEOUT ((usec_t) (25 * USEC_PER_SEC)) | |
| | | | |
| skipping to change at line 158 | | skipping to change at line 182 | |
| | | | |
| #define BUS_FDS_MAX 1024 | | #define BUS_FDS_MAX 1024 | |
| | | | |
| #define BUS_EXEC_ARGV_MAX 256 | | #define BUS_EXEC_ARGV_MAX 256 | |
| | | | |
| bool object_path_is_valid(const char *p); | | bool object_path_is_valid(const char *p); | |
| bool interface_name_is_valid(const char *p); | | bool interface_name_is_valid(const char *p); | |
| bool service_name_is_valid(const char *p); | | bool service_name_is_valid(const char *p); | |
| bool member_name_is_valid(const char *p); | | bool member_name_is_valid(const char *p); | |
| | | | |
|
| | | bool namespace_complex_pattern(const char *pattern, const char *value); | |
| | | bool path_complex_pattern(const char *pattern, const char *value); | |
| | | | |
| | | bool namespace_simple_pattern(const char *pattern, const char *value); | |
| | | bool path_simple_pattern(const char *pattern, const char *value); | |
| | | | |
| | | int bus_message_type_from_string(const char *s, uint8_t *u); | |
| | | | |
| #define error_name_is_valid interface_name_is_valid | | #define error_name_is_valid interface_name_is_valid | |
| | | | |
| int bus_ensure_running(sd_bus *bus); | | int bus_ensure_running(sd_bus *bus); | |
| int bus_start_running(sd_bus *bus); | | int bus_start_running(sd_bus *bus); | |
| int bus_next_address(sd_bus *bus); | | int bus_next_address(sd_bus *bus); | |
| | | | |
End of changes. 15 change blocks. |
| 7 lines changed or deleted | | 39 lines changed or added | |
|
| conf-parser.h | | conf-parser.h | |
| | | | |
| skipping to change at line 104 | | skipping to change at line 104 | |
| int config_parse_uint64(const char *filename, unsigned line, const char *se
ction, const char *lvalue, int ltype, const char *rvalue, void *data, void
*userdata); | | int config_parse_uint64(const char *filename, unsigned line, const char *se
ction, const char *lvalue, int ltype, const char *rvalue, void *data, void
*userdata); | |
| int config_parse_double(const char *filename, unsigned line, const char *se
ction, const char *lvalue, int ltype, const char *rvalue, void *data, void
*userdata); | | int config_parse_double(const char *filename, unsigned line, const char *se
ction, const char *lvalue, int ltype, const char *rvalue, void *data, void
*userdata); | |
| int config_parse_bytes_size(const char *filename, unsigned line, const char
*section, const char *lvalue, int ltype, const char *rvalue, void *data, v
oid *userdata); | | int config_parse_bytes_size(const char *filename, unsigned line, const char
*section, const char *lvalue, int ltype, const char *rvalue, void *data, v
oid *userdata); | |
| int config_parse_bytes_off(const char *filename, unsigned line, const char
*section, const char *lvalue, int ltype, const char *rvalue, void *data, vo
id *userdata); | | int config_parse_bytes_off(const char *filename, unsigned line, const char
*section, const char *lvalue, int ltype, const char *rvalue, void *data, vo
id *userdata); | |
| int config_parse_bool(const char *filename, unsigned line, const char *sect
ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u
serdata); | | int config_parse_bool(const char *filename, unsigned line, const char *sect
ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u
serdata); | |
| int config_parse_tristate(const char *filename, unsigned line, const char *
section, const char *lvalue, int ltype, const char *rvalue, void *data, voi
d *userdata); | | int config_parse_tristate(const char *filename, unsigned line, const char *
section, const char *lvalue, int ltype, const char *rvalue, void *data, voi
d *userdata); | |
| int config_parse_string(const char *filename, unsigned line, const char *se
ction, const char *lvalue, int ltype, const char *rvalue, void *data, void
*userdata); | | int config_parse_string(const char *filename, unsigned line, const char *se
ction, const char *lvalue, int ltype, const char *rvalue, void *data, void
*userdata); | |
| int config_parse_path(const char *filename, unsigned line, const char *sect
ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u
serdata); | | int config_parse_path(const char *filename, unsigned line, const char *sect
ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u
serdata); | |
| int config_parse_strv(const char *filename, unsigned line, const char *sect
ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u
serdata); | | int config_parse_strv(const char *filename, unsigned line, const char *sect
ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u
serdata); | |
| int config_parse_path_strv(const char *filename, unsigned line, const char
*section, const char *lvalue, int ltype, const char *rvalue, void *data, vo
id *userdata); | | int config_parse_path_strv(const char *filename, unsigned line, const char
*section, const char *lvalue, int ltype, const char *rvalue, void *data, vo
id *userdata); | |
|
| int config_parse_usec(const char *filename, unsigned line, const char *sect
ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u
serdata); | | int config_parse_sec(const char *filename, unsigned line, const char *secti
on, const char *lvalue, int ltype, const char *rvalue, void *data, void *us
erdata); | |
| int config_parse_nsec(const char *filename, unsigned line, const char *sect
ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u
serdata); | | int config_parse_nsec(const char *filename, unsigned line, const char *sect
ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u
serdata); | |
| int config_parse_mode(const char *filename, unsigned line, const char *sect
ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u
serdata); | | int config_parse_mode(const char *filename, unsigned line, const char *sect
ion, const char *lvalue, int ltype, const char *rvalue, void *data, void *u
serdata); | |
| int config_parse_facility(const char *filename, unsigned line, const char *
section, const char *lvalue, int ltype, const char *rvalue, void *data, voi
d *userdata); | | int config_parse_facility(const char *filename, unsigned line, const char *
section, const char *lvalue, int ltype, const char *rvalue, void *data, voi
d *userdata); | |
| int config_parse_level(const char *filename, unsigned line, const char *sec
tion, const char *lvalue, int ltype, const char *rvalue, void *data, void *
userdata); | | int config_parse_level(const char *filename, unsigned line, const char *sec
tion, const char *lvalue, int ltype, const char *rvalue, void *data, void *
userdata); | |
| int config_parse_set_status(const char *filename, unsigned line, const char
*section, const char *lvalue, int ltype, const char *rvalue, void *data, v
oid *userdata); | | int config_parse_set_status(const char *filename, unsigned line, const char
*section, const char *lvalue, int ltype, const char *rvalue, void *data, v
oid *userdata); | |
| | | | |
| #define DEFINE_CONFIG_PARSE_ENUM(function,name,type,msg) \ | | #define DEFINE_CONFIG_PARSE_ENUM(function,name,type,msg) \ | |
| int function( \ | | int function( \ | |
| const char *filename, \ | | const char *filename, \ | |
| unsigned line, \ | | unsigned line, \ | |
| | | | |
End of changes. 1 change blocks. |
| 1 lines changed or deleted | | 1 lines changed or added | |
|
| config.h | | config.h | |
| | | | |
| skipping to change at line 247 | | skipping to change at line 247 | |
| /* Name of package */ | | /* Name of package */ | |
| #define PACKAGE "systemd" | | #define PACKAGE "systemd" | |
| | | | |
| /* Define to the address where bug reports for this package should be sent.
*/ | | /* Define to the address where bug reports for this package should be sent.
*/ | |
| #define PACKAGE_BUGREPORT "http://bugs.freedesktop.org/enter_bug.cgi?produc
t=systemd" | | #define PACKAGE_BUGREPORT "http://bugs.freedesktop.org/enter_bug.cgi?produc
t=systemd" | |
| | | | |
| /* Define to the full name of this package. */ | | /* Define to the full name of this package. */ | |
| #define PACKAGE_NAME "systemd" | | #define PACKAGE_NAME "systemd" | |
| | | | |
| /* Define to the full name and version of this package. */ | | /* Define to the full name and version of this package. */ | |
|
| #define PACKAGE_STRING "systemd 200" | | #define PACKAGE_STRING "systemd 201" | |
| | | | |
| /* Define to the one symbol short name of this package. */ | | /* Define to the one symbol short name of this package. */ | |
| #define PACKAGE_TARNAME "systemd" | | #define PACKAGE_TARNAME "systemd" | |
| | | | |
| /* Define to the home page for this package. */ | | /* Define to the home page for this package. */ | |
| #define PACKAGE_URL "http://www.freedesktop.org/wiki/Software/systemd" | | #define PACKAGE_URL "http://www.freedesktop.org/wiki/Software/systemd" | |
| | | | |
| /* Define to the version of this package. */ | | /* Define to the version of this package. */ | |
|
| #define PACKAGE_VERSION "200" | | #define PACKAGE_VERSION "201" | |
| | | | |
| /* Path of /etc/rc.local script */ | | /* Path of /etc/rc.local script */ | |
| #define RC_LOCAL_SCRIPT_PATH_START "/etc/rc.local" | | #define RC_LOCAL_SCRIPT_PATH_START "/etc/rc.local" | |
| | | | |
| /* Path of /usr/sbin/halt.local script */ | | /* Path of /usr/sbin/halt.local script */ | |
| #define RC_LOCAL_SCRIPT_PATH_STOP "/usr/sbin/halt.local" | | #define RC_LOCAL_SCRIPT_PATH_STOP "/usr/sbin/halt.local" | |
| | | | |
| /* Define to the type of arg 1 for `select'. */ | | /* Define to the type of arg 1 for `select'. */ | |
| #define SELECT_TYPE_ARG1 int | | #define SELECT_TYPE_ARG1 int | |
| | | | |
| | | | |
| skipping to change at line 307 | | skipping to change at line 307 | |
| /* Enable extensions on HP NonStop. */ | | /* Enable extensions on HP NonStop. */ | |
| #ifndef _TANDEM_SOURCE | | #ifndef _TANDEM_SOURCE | |
| # define _TANDEM_SOURCE 1 | | # define _TANDEM_SOURCE 1 | |
| #endif | | #endif | |
| /* Enable general extensions on Solaris. */ | | /* Enable general extensions on Solaris. */ | |
| #ifndef __EXTENSIONS__ | | #ifndef __EXTENSIONS__ | |
| # define __EXTENSIONS__ 1 | | # define __EXTENSIONS__ 1 | |
| #endif | | #endif | |
| | | | |
| /* Version number of package */ | | /* Version number of package */ | |
|
| #define VERSION "200" | | #define VERSION "201" | |
| | | | |
| /* Enable large inode numbers on Mac OS X 10.5. */ | | /* Enable large inode numbers on Mac OS X 10.5. */ | |
| #ifndef _DARWIN_USE_64_BIT_INODE | | #ifndef _DARWIN_USE_64_BIT_INODE | |
| # define _DARWIN_USE_64_BIT_INODE 1 | | # define _DARWIN_USE_64_BIT_INODE 1 | |
| #endif | | #endif | |
| | | | |
| /* Number of bits in a file offset, on hosts where this is settable. */ | | /* Number of bits in a file offset, on hosts where this is settable. */ | |
| #define _FILE_OFFSET_BITS 64 | | #define _FILE_OFFSET_BITS 64 | |
| | | | |
| /* Define for large files, on AIX-style hosts. */ | | /* Define for large files, on AIX-style hosts. */ | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| scsi_id.h | | scsi_id.h | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU General Public License | | * You should have received a copy of the GNU General Public License | |
| * along with this program. If not, see <http://www.gnu.org/licenses/>. | | * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| */ | | */ | |
| | | | |
|
| #define MAX_PATH_LEN 512 | | #define MAX_PATH_LEN 512 | |
| | | | |
| /* | | /* | |
| * MAX_ATTR_LEN: maximum length of the result of reading a sysfs | | * MAX_ATTR_LEN: maximum length of the result of reading a sysfs | |
| * attribute. | | * attribute. | |
| */ | | */ | |
|
| #define MAX_ATTR_LEN 256 | | #define MAX_ATTR_LEN 256 | |
| | | | |
| /* | | /* | |
| * MAX_SERIAL_LEN: the maximum length of the serial number, including | | * MAX_SERIAL_LEN: the maximum length of the serial number, including | |
| * added prefixes such as vendor and product (model) strings. | | * added prefixes such as vendor and product (model) strings. | |
| */ | | */ | |
|
| #define MAX_SERIAL_LEN 256 | | #define MAX_SERIAL_LEN 256 | |
| | | | |
| /* | | /* | |
| * MAX_BUFFER_LEN: maximum buffer size and line length used while reading | | * MAX_BUFFER_LEN: maximum buffer size and line length used while reading | |
| * the config file. | | * the config file. | |
| */ | | */ | |
|
| #define MAX_BUFFER_LEN 256 | | #define MAX_BUFFER_LEN 256 | |
| | | | |
| struct scsi_id_device { | | struct scsi_id_device { | |
| char vendor[9]; | | char vendor[9]; | |
| char model[17]; | | char model[17]; | |
| char revision[5]; | | char revision[5]; | |
| char type[33]; | | char type[33]; | |
| char kernel[64]; | | char kernel[64]; | |
| char serial[MAX_SERIAL_LEN]; | | char serial[MAX_SERIAL_LEN]; | |
| char serial_short[MAX_SERIAL_LEN]; | | char serial_short[MAX_SERIAL_LEN]; | |
| int use_sg; | | int use_sg; | |
| | | | |
| skipping to change at line 61 | | skipping to change at line 61 | |
| /* NULs if not set - otherwise hex encoding using lower-case e.g. '
50014ee0016eb572' */ | | /* NULs if not set - otherwise hex encoding using lower-case e.g. '
50014ee0016eb572' */ | |
| char wwn[17]; | | char wwn[17]; | |
| | | | |
| /* NULs if not set - otherwise hex encoding using lower-case e.g. '
0xe00000d80000' */ | | /* NULs if not set - otherwise hex encoding using lower-case e.g. '
0xe00000d80000' */ | |
| char wwn_vendor_extension[17]; | | char wwn_vendor_extension[17]; | |
| | | | |
| /* NULs if not set - otherwise decimal number */ | | /* NULs if not set - otherwise decimal number */ | |
| char tgpt_group[8]; | | char tgpt_group[8]; | |
| }; | | }; | |
| | | | |
|
| extern int scsi_std_inquiry(struct udev *udev, struct scsi_id_device *dev_s | | int scsi_std_inquiry(struct udev *udev, struct scsi_id_device *dev_scsi, co | |
| csi, const char *devname); | | nst char *devname); | |
| extern int scsi_get_serial (struct udev *udev, struct scsi_id_device *dev_s | | int scsi_get_serial(struct udev *udev, struct scsi_id_device *dev_scsi, con | |
| csi, const char *devname, | | st char *devname, | |
| int page_code, int len); | | int page_code, int len); | |
| | | | |
| /* | | /* | |
| * Page code values. | | * Page code values. | |
| */ | | */ | |
| enum page_code { | | enum page_code { | |
| PAGE_83_PRE_SPC3 = -0x83, | | PAGE_83_PRE_SPC3 = -0x83, | |
| PAGE_UNSPECIFIED = 0x00, | | PAGE_UNSPECIFIED = 0x00, | |
|
| PAGE_80 = 0x80, | | PAGE_80 = 0x80, | |
| PAGE_83 = 0x83, | | PAGE_83 = 0x83, | |
| }; | | }; | |
| | | | |
End of changes. 6 change blocks. |
| 11 lines changed or deleted | | 11 lines changed or added | |
|
| sd-bus.h | | sd-bus.h | |
| | | | |
| skipping to change at line 31 | | skipping to change at line 31 | |
| You should have received a copy of the GNU Lesser General Public License | | You should have received a copy of the GNU Lesser General Public License | |
| along with systemd; If not, see <http://www.gnu.org/licenses/>. | | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
| ***/ | | ***/ | |
| | | | |
| #include <inttypes.h> | | #include <inttypes.h> | |
| #include <sys/types.h> | | #include <sys/types.h> | |
| | | | |
| #include <sd-id128.h> | | #include <sd-id128.h> | |
| #include "sd-bus-protocol.h" | | #include "sd-bus-protocol.h" | |
| | | | |
|
| | | #ifdef __cplusplus | |
| | | extern "C" { | |
| | | #endif | |
| | | | |
| /* TODO: | | /* TODO: | |
|
| * - server side | | * - rewrite message_read_ap() and message_append_ap() to be non-recursive. | |
| * - allow installing match callbacks | | | |
| * - anonymous auth | | | |
| * - default policy | | | |
| * | | * | |
|
| * Later: | | | |
| * - add page donation logic | | * - add page donation logic | |
| * - api for appending/reading fixed arrays | | * - api for appending/reading fixed arrays | |
| * - merge busctl into systemctl or so? | | * - merge busctl into systemctl or so? | |
|
| | | * - default policy (allow uid == 0 and our own uid) | |
| */ | | */ | |
| | | | |
| typedef struct sd_bus sd_bus; | | typedef struct sd_bus sd_bus; | |
| typedef struct sd_bus_message sd_bus_message; | | typedef struct sd_bus_message sd_bus_message; | |
| | | | |
| typedef struct { | | typedef struct { | |
| const char *name; | | const char *name; | |
| const char *message; | | const char *message; | |
| int need_free; | | int need_free; | |
| } sd_bus_error; | | } sd_bus_error; | |
| | | | |
|
| typedef int (*sd_message_handler_t)(sd_bus *bus, int ret, sd_bus_message *m
, void *userdata); | | typedef int (*sd_bus_message_handler_t)(sd_bus *bus, int ret, sd_bus_messag
e *m, void *userdata); | |
| | | | |
| /* Connections */ | | /* Connections */ | |
| | | | |
| int sd_bus_open_system(sd_bus **ret); | | int sd_bus_open_system(sd_bus **ret); | |
| int sd_bus_open_user(sd_bus **ret); | | int sd_bus_open_user(sd_bus **ret); | |
| | | | |
| int sd_bus_new(sd_bus **ret); | | int sd_bus_new(sd_bus **ret); | |
| int sd_bus_set_address(sd_bus *bus, const char *address); | | int sd_bus_set_address(sd_bus *bus, const char *address); | |
|
| int sd_bus_set_fd(sd_bus *bus, int fd); | | int sd_bus_set_fd(sd_bus *bus, int input_fd, int output_fd); | |
| int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]); | | int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]); | |
| int sd_bus_set_bus_client(sd_bus *bus, int b); | | int sd_bus_set_bus_client(sd_bus *bus, int b); | |
|
| | | int sd_bus_set_server(sd_bus *bus, int b, sd_id128_t server_id); | |
| | | int sd_bus_set_anonymous(sd_bus *bus, int b); | |
| int sd_bus_set_negotiate_fds(sd_bus *bus, int b); | | int sd_bus_set_negotiate_fds(sd_bus *bus, int b); | |
| int sd_bus_start(sd_bus *ret); | | int sd_bus_start(sd_bus *ret); | |
| | | | |
| void sd_bus_close(sd_bus *bus); | | void sd_bus_close(sd_bus *bus); | |
| | | | |
| sd_bus *sd_bus_ref(sd_bus *bus); | | sd_bus *sd_bus_ref(sd_bus *bus); | |
| sd_bus *sd_bus_unref(sd_bus *bus); | | sd_bus *sd_bus_unref(sd_bus *bus); | |
| | | | |
| int sd_bus_is_open(sd_bus *bus); | | int sd_bus_is_open(sd_bus *bus); | |
| int sd_bus_can_send(sd_bus *bus, char type); | | int sd_bus_can_send(sd_bus *bus, char type); | |
|
| int sd_bus_get_peer(sd_bus *bus, sd_id128_t *peer); | | int sd_bus_get_server_id(sd_bus *bus, sd_id128_t *peer); | |
| | | | |
| int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *serial); | | int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *serial); | |
|
| int sd_bus_send_with_reply(sd_bus *bus, sd_bus_message *m, sd_message_handl
er_t callback, void *userdata, uint64_t usec, uint64_t *serial); | | int sd_bus_send_with_reply(sd_bus *bus, sd_bus_message *m, sd_bus_message_h
andler_t callback, void *userdata, uint64_t usec, uint64_t *serial); | |
| int sd_bus_send_with_reply_cancel(sd_bus *bus, uint64_t serial); | | int sd_bus_send_with_reply_cancel(sd_bus *bus, uint64_t serial); | |
| int sd_bus_send_with_reply_and_block(sd_bus *bus, sd_bus_message *m, uint64
_t usec, sd_bus_error *error, sd_bus_message **r); | | int sd_bus_send_with_reply_and_block(sd_bus *bus, sd_bus_message *m, uint64
_t usec, sd_bus_error *error, sd_bus_message **r); | |
| | | | |
| int sd_bus_get_fd(sd_bus *bus); | | int sd_bus_get_fd(sd_bus *bus); | |
| int sd_bus_get_events(sd_bus *bus); | | int sd_bus_get_events(sd_bus *bus); | |
| int sd_bus_get_timeout(sd_bus *bus, uint64_t *timeout_usec); | | int sd_bus_get_timeout(sd_bus *bus, uint64_t *timeout_usec); | |
| int sd_bus_process(sd_bus *bus, sd_bus_message **r); | | int sd_bus_process(sd_bus *bus, sd_bus_message **r); | |
| int sd_bus_wait(sd_bus *bus, uint64_t timeout_usec); | | int sd_bus_wait(sd_bus *bus, uint64_t timeout_usec); | |
| int sd_bus_flush(sd_bus *bus); | | int sd_bus_flush(sd_bus *bus); | |
| | | | |
|
| int sd_bus_add_filter(sd_bus *bus, sd_message_handler_t callback, void *use | | int sd_bus_add_filter(sd_bus *bus, sd_bus_message_handler_t callback, void | |
| rdata); | | *userdata); | |
| int sd_bus_remove_filter(sd_bus *bus, sd_message_handler_t callback, void * | | int sd_bus_remove_filter(sd_bus *bus, sd_bus_message_handler_t callback, vo | |
| userdata); | | id *userdata); | |
| | | | |
|
| int sd_bus_add_object(sd_bus *bus, const char *path, sd_message_handler_t c | | int sd_bus_add_object(sd_bus *bus, const char *path, sd_bus_message_handler | |
| allback, void *userdata); | | _t callback, void *userdata); | |
| int sd_bus_remove_object(sd_bus *bus, const char *path, sd_message_handler_ | | int sd_bus_remove_object(sd_bus *bus, const char *path, sd_bus_message_hand | |
| t callback, void *userdata); | | ler_t callback, void *userdata); | |
| | | | |
|
| int sd_bus_add_fallback(sd_bus *bus, const char *prefix, sd_message_handler | | int sd_bus_add_fallback(sd_bus *bus, const char *prefix, sd_bus_message_han | |
| _t callback, void *userdata); | | dler_t callback, void *userdata); | |
| int sd_bus_remove_fallback(sd_bus *bus, const char *prefix, sd_message_hand | | int sd_bus_remove_fallback(sd_bus *bus, const char *prefix, sd_bus_message_ | |
| ler_t callback, void *userdata); | | handler_t callback, void *userdata); | |
| | | | |
| | | int sd_bus_add_match(sd_bus *bus, const char *match, sd_bus_message_handler | |
| | | _t callback, void *userdata); | |
| | | int sd_bus_remove_match(sd_bus *bus, const char *match, sd_bus_message_hand | |
| | | ler_t callback, void *userdata); | |
| | | | |
| /* Message object */ | | /* Message object */ | |
| | | | |
| int sd_bus_message_new_signal(sd_bus *bus, const char *path, const char *in
terface, const char *member, sd_bus_message **m); | | int sd_bus_message_new_signal(sd_bus *bus, const char *path, const char *in
terface, const char *member, sd_bus_message **m); | |
| int sd_bus_message_new_method_call(sd_bus *bus, const char *destination, co
nst char *path, const char *interface, const char *member, sd_bus_message *
*m); | | int sd_bus_message_new_method_call(sd_bus *bus, const char *destination, co
nst char *path, const char *interface, const char *member, sd_bus_message *
*m); | |
| int sd_bus_message_new_method_return(sd_bus *bus, sd_bus_message *call, sd_
bus_message **m); | | int sd_bus_message_new_method_return(sd_bus *bus, sd_bus_message *call, sd_
bus_message **m); | |
| int sd_bus_message_new_method_error(sd_bus *bus, sd_bus_message *call, cons
t sd_bus_error *e, sd_bus_message **m); | | int sd_bus_message_new_method_error(sd_bus *bus, sd_bus_message *call, cons
t sd_bus_error *e, sd_bus_message **m); | |
| | | | |
| sd_bus_message* sd_bus_message_ref(sd_bus_message *m); | | sd_bus_message* sd_bus_message_ref(sd_bus_message *m); | |
| sd_bus_message* sd_bus_message_unref(sd_bus_message *m); | | sd_bus_message* sd_bus_message_unref(sd_bus_message *m); | |
| | | | |
| skipping to change at line 144 | | skipping to change at line 150 | |
| int sd_bus_message_open_container(sd_bus_message *m, char type, const char
*contents); | | int sd_bus_message_open_container(sd_bus_message *m, char type, const char
*contents); | |
| int sd_bus_message_close_container(sd_bus_message *m); | | int sd_bus_message_close_container(sd_bus_message *m); | |
| | | | |
| int sd_bus_message_read(sd_bus_message *m, const char *types, ...); | | int sd_bus_message_read(sd_bus_message *m, const char *types, ...); | |
| int sd_bus_message_read_basic(sd_bus_message *m, char type, void *p); | | int sd_bus_message_read_basic(sd_bus_message *m, char type, void *p); | |
| int sd_bus_message_enter_container(sd_bus_message *m, char type, const char
*contents); | | int sd_bus_message_enter_container(sd_bus_message *m, char type, const char
*contents); | |
| int sd_bus_message_exit_container(sd_bus_message *m); | | int sd_bus_message_exit_container(sd_bus_message *m); | |
| int sd_bus_message_peek_type(sd_bus_message *m, char *type, const char **co
ntents); | | int sd_bus_message_peek_type(sd_bus_message *m, char *type, const char **co
ntents); | |
| int sd_bus_message_rewind(sd_bus_message *m, int complete); | | int sd_bus_message_rewind(sd_bus_message *m, int complete); | |
| | | | |
|
| | | /* Convenience calls */ | |
| | | | |
| | | int sd_bus_emit_signal(sd_bus *bus, const char *path, const char *interface | |
| | | , const char *member, const char *types, ...); | |
| | | int sd_bus_call_method(sd_bus *bus, const char *destination, const char *pa | |
| | | th, const char *interface, const char *member, sd_bus_error *error, sd_bus_ | |
| | | message **reply, const char *types, ...); | |
| | | int sd_bus_reply_method_return(sd_bus *bus, sd_bus_message *call, const cha | |
| | | r *types, ...); | |
| | | int sd_bus_reply_method_error(sd_bus *bus, sd_bus_message *call, const sd_b | |
| | | us_error *e); | |
| | | | |
| /* Bus management */ | | /* Bus management */ | |
| | | | |
| int sd_bus_get_unique_name(sd_bus *bus, const char **unique); | | int sd_bus_get_unique_name(sd_bus *bus, const char **unique); | |
| int sd_bus_request_name(sd_bus *bus, const char *name, int flags); | | int sd_bus_request_name(sd_bus *bus, const char *name, int flags); | |
| int sd_bus_release_name(sd_bus *bus, const char *name); | | int sd_bus_release_name(sd_bus *bus, const char *name); | |
| int sd_bus_list_names(sd_bus *bus, char ***l); | | int sd_bus_list_names(sd_bus *bus, char ***l); | |
| int sd_bus_get_owner(sd_bus *bus, const char *name, char **owner); | | int sd_bus_get_owner(sd_bus *bus, const char *name, char **owner); | |
| int sd_bus_get_owner_uid(sd_bus *bus, const char *name, uid_t *uid); | | int sd_bus_get_owner_uid(sd_bus *bus, const char *name, uid_t *uid); | |
| int sd_bus_get_owner_pid(sd_bus *bus, const char *name, pid_t *pid); | | int sd_bus_get_owner_pid(sd_bus *bus, const char *name, pid_t *pid); | |
|
| int sd_bus_add_match(sd_bus *bus, const char *match); | | | |
| int sd_bus_remove_match(sd_bus *bus, const char *match); | | | |
| | | | |
| /* Error structures */ | | /* Error structures */ | |
| | | | |
|
| #define SD_BUS_ERROR_INIT {NULL, NULL, 0} | | #define SD_BUS_ERROR_NULL ((sd_bus_error) {NULL, NULL, 0}) | |
| #define SD_BUS_ERROR_INIT_CONST(name, message) {(name), (message), 0} | | #define SD_BUS_ERROR_MAKE(name, message) ((sd_bus_error) {(name), (message) | |
| | | , 0}) | |
| | | | |
| void sd_bus_error_free(sd_bus_error *e); | | void sd_bus_error_free(sd_bus_error *e); | |
| int sd_bus_error_set(sd_bus_error *e, const char *name, const char *format,
...); | | int sd_bus_error_set(sd_bus_error *e, const char *name, const char *format,
...); | |
| void sd_bus_error_set_const(sd_bus_error *e, const char *name, const char *
message); | | void sd_bus_error_set_const(sd_bus_error *e, const char *name, const char *
message); | |
| int sd_bus_error_copy(sd_bus_error *dest, const sd_bus_error *e); | | int sd_bus_error_copy(sd_bus_error *dest, const sd_bus_error *e); | |
| int sd_bus_error_is_set(const sd_bus_error *e); | | int sd_bus_error_is_set(const sd_bus_error *e); | |
| int sd_bus_error_has_name(const sd_bus_error *e, const char *name); | | int sd_bus_error_has_name(const sd_bus_error *e, const char *name); | |
| | | | |
|
| | | #ifdef __cplusplus | |
| | | } | |
| | | #endif | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 16 change blocks. |
| 25 lines changed or deleted | | 48 lines changed or added | |
|
| time-util.h | | time-util.h | |
| | | | |
| skipping to change at line 25 | | skipping to change at line 25 | |
| systemd is distributed in the hope that it will be useful, but | | systemd is distributed in the hope that it will be useful, but | |
| WITHOUT ANY WARRANTY; without even the implied warranty of | | WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| Lesser General Public License for more details. | | Lesser General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU Lesser General Public License | | You should have received a copy of the GNU Lesser General Public License | |
| along with systemd; If not, see <http://www.gnu.org/licenses/>. | | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
| ***/ | | ***/ | |
| | | | |
| #include <stdio.h> | | #include <stdio.h> | |
|
| | | #include <inttypes.h> | |
| | | | |
| typedef uint64_t usec_t; | | typedef uint64_t usec_t; | |
| typedef uint64_t nsec_t; | | typedef uint64_t nsec_t; | |
| | | | |
| #include "macro.h" | | #include "macro.h" | |
| | | | |
| typedef struct dual_timestamp { | | typedef struct dual_timestamp { | |
| usec_t realtime; | | usec_t realtime; | |
| usec_t monotonic; | | usec_t monotonic; | |
| } dual_timestamp; | | } dual_timestamp; | |
| | | | |
| skipping to change at line 76 | | skipping to change at line 77 | |
| #define dual_timestamp_is_set(ts) ((ts)->realtime > 0) | | #define dual_timestamp_is_set(ts) ((ts)->realtime > 0) | |
| | | | |
| usec_t timespec_load(const struct timespec *ts); | | usec_t timespec_load(const struct timespec *ts); | |
| struct timespec *timespec_store(struct timespec *ts, usec_t u); | | struct timespec *timespec_store(struct timespec *ts, usec_t u); | |
| | | | |
| usec_t timeval_load(const struct timeval *tv); | | usec_t timeval_load(const struct timeval *tv); | |
| struct timeval *timeval_store(struct timeval *tv, usec_t u); | | struct timeval *timeval_store(struct timeval *tv, usec_t u); | |
| | | | |
| char *format_timestamp(char *buf, size_t l, usec_t t); | | char *format_timestamp(char *buf, size_t l, usec_t t); | |
| char *format_timestamp_relative(char *buf, size_t l, usec_t t); | | char *format_timestamp_relative(char *buf, size_t l, usec_t t); | |
|
| char *format_timespan(char *buf, size_t l, usec_t t); | | char *format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy); | |
| | | | |
| void dual_timestamp_serialize(FILE *f, const char *name, dual_timestamp *t)
; | | void dual_timestamp_serialize(FILE *f, const char *name, dual_timestamp *t)
; | |
| void dual_timestamp_deserialize(const char *value, dual_timestamp *t); | | void dual_timestamp_deserialize(const char *value, dual_timestamp *t); | |
| | | | |
| int parse_timestamp(const char *t, usec_t *usec); | | int parse_timestamp(const char *t, usec_t *usec); | |
| | | | |
|
| int parse_usec(const char *t, usec_t *usec); | | int parse_sec(const char *t, usec_t *usec); | |
| int parse_nsec(const char *t, nsec_t *nsec); | | int parse_nsec(const char *t, nsec_t *nsec); | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 3 lines changed or added | |
|
| util.h | | util.h | |
| | | | |
| skipping to change at line 39 | | skipping to change at line 39 | |
| #include <stdlib.h> | | #include <stdlib.h> | |
| #include <stdio.h> | | #include <stdio.h> | |
| #include <signal.h> | | #include <signal.h> | |
| #include <sched.h> | | #include <sched.h> | |
| #include <limits.h> | | #include <limits.h> | |
| #include <sys/types.h> | | #include <sys/types.h> | |
| #include <sys/stat.h> | | #include <sys/stat.h> | |
| #include <dirent.h> | | #include <dirent.h> | |
| #include <sys/resource.h> | | #include <sys/resource.h> | |
| #include <stddef.h> | | #include <stddef.h> | |
|
| #include <systemd/sd-journal.h> | | #include <unistd.h> | |
| | | | |
|
| | | #include <systemd/sd-journal.h> | |
| #include "macro.h" | | #include "macro.h" | |
| #include "time-util.h" | | #include "time-util.h" | |
| | | | |
| union dirent_storage { | | union dirent_storage { | |
| struct dirent de; | | struct dirent de; | |
| uint8_t storage[offsetof(struct dirent, d_name) + | | uint8_t storage[offsetof(struct dirent, d_name) + | |
| ((NAME_MAX + 1 + sizeof(long)) & ~(sizeof(long) - 1
))]; | | ((NAME_MAX + 1 + sizeof(long)) & ~(sizeof(long) - 1
))]; | |
| }; | | }; | |
| | | | |
| /* What is interpreted as whitespace? */ | | /* What is interpreted as whitespace? */ | |
| | | | |
| skipping to change at line 332 | | skipping to change at line 333 | |
| | | | |
| int close_pipe(int p[]); | | int close_pipe(int p[]); | |
| int fopen_temporary(const char *path, FILE **_f, char **_temp_path); | | int fopen_temporary(const char *path, FILE **_f, char **_temp_path); | |
| | | | |
| ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll); | | ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll); | |
| ssize_t loop_write(int fd, const void *buf, size_t nbytes, bool do_poll); | | ssize_t loop_write(int fd, const void *buf, size_t nbytes, bool do_poll); | |
| | | | |
| bool is_device_path(const char *path); | | bool is_device_path(const char *path); | |
| | | | |
| int dir_is_empty(const char *path); | | int dir_is_empty(const char *path); | |
|
| | | char* dirname_malloc(const char *path); | |
| | | | |
| void rename_process(const char name[8]); | | void rename_process(const char name[8]); | |
| | | | |
| void sigset_add_many(sigset_t *ss, ...); | | void sigset_add_many(sigset_t *ss, ...); | |
| | | | |
| bool hostname_is_set(void); | | bool hostname_is_set(void); | |
| | | | |
| char* gethostname_malloc(void); | | char* gethostname_malloc(void); | |
| char* getlogname_malloc(void); | | char* getlogname_malloc(void); | |
| char* getusername_malloc(void); | | char* getusername_malloc(void); | |
| | | | |
| skipping to change at line 540 | | skipping to change at line 542 | |
| void closep(int *fd); | | void closep(int *fd); | |
| void closedirp(DIR **d); | | void closedirp(DIR **d); | |
| static inline void umaskp(mode_t *u) { | | static inline void umaskp(mode_t *u) { | |
| umask(*u); | | umask(*u); | |
| } | | } | |
| | | | |
| static inline void journal_closep(sd_journal **j) { | | static inline void journal_closep(sd_journal **j) { | |
| sd_journal_close(*j); | | sd_journal_close(*j); | |
| } | | } | |
| | | | |
|
| | | #define _cleanup_globfree_ __attribute__((cleanup(globfree))) | |
| | | | |
| _malloc_ static inline void *malloc_multiply(size_t a, size_t b) { | | _malloc_ static inline void *malloc_multiply(size_t a, size_t b) { | |
| if (_unlikely_(b == 0 || a > ((size_t) -1) / b)) | | if (_unlikely_(b == 0 || a > ((size_t) -1) / b)) | |
| return NULL; | | return NULL; | |
| | | | |
| return malloc(a * b); | | return malloc(a * b); | |
| } | | } | |
| | | | |
| _malloc_ static inline void *memdup_multiply(const void *p, size_t a, size_
t b) { | | _malloc_ static inline void *memdup_multiply(const void *p, size_t a, size_
t b) { | |
| if (_unlikely_(b == 0 || a > ((size_t) -1) / b)) | | if (_unlikely_(b == 0 || a > ((size_t) -1) / b)) | |
| return NULL; | | return NULL; | |
| | | | |
| skipping to change at line 597 | | skipping to change at line 601 | |
| if (!fgets(line, sizeof(line), f)) { \ | | if (!fgets(line, sizeof(line), f)) { \ | |
| if (ferror(f)) { \ | | if (ferror(f)) { \ | |
| on_error; \ | | on_error; \ | |
| } \ | | } \ | |
| break; \ | | break; \ | |
| } else | | } else | |
| | | | |
| #define FOREACH_DIRENT(de, d, on_error) \ | | #define FOREACH_DIRENT(de, d, on_error) \ | |
| for (errno = 0, de = readdir(d);; errno = 0, de = readdir(d)) \ | | for (errno = 0, de = readdir(d);; errno = 0, de = readdir(d)) \ | |
| if (!de) { \ | | if (!de) { \ | |
|
| if (errno != 0) { \ | | if (errno > 0) { \ | |
| on_error; \ | | on_error; \ | |
| } \ | | } \ | |
| break; \ | | break; \ | |
| } else if (ignore_file((de)->d_name)) \ | | } else if (ignore_file((de)->d_name)) \ | |
| continue; \ | | continue; \ | |
| else | | else | |
| | | | |
| static inline void *mempset(void *s, int c, size_t n) { | | static inline void *mempset(void *s, int c, size_t n) { | |
| memset(s, c, n); | | memset(s, c, n); | |
| return (char*)s + n; | | return (char*)s + n; | |
| } | | } | |
| | | | |
| char *hexmem(const void *p, size_t l); | | char *hexmem(const void *p, size_t l); | |
|
| | | void *unhexmem(const char *p, size_t l); | |
| | | | |
| char *strextend(char **x, ...); | | char *strextend(char **x, ...); | |
| char *strrep(const char *s, unsigned n); | | char *strrep(const char *s, unsigned n); | |
|
| | | | |
| | | void* greedy_realloc(void **p, size_t *allocated, size_t need); | |
| | | | |
| | | static inline void _reset_errno_(int *saved_errno) { | |
| | | errno = *saved_errno; | |
| | | } | |
| | | | |
| | | #define PROTECT_ERRNO __attribute__((cleanup(_reset_errno_))) int _saved_er | |
| | | rno_ = errno | |
| | | | |
| | | struct umask_struct { | |
| | | mode_t mask; | |
| | | bool quit; | |
| | | }; | |
| | | | |
| | | static inline void _reset_umask_(struct umask_struct *s) { | |
| | | umask(s->mask); | |
| | | }; | |
| | | | |
| | | #define RUN_WITH_UMASK(mask) \ | |
| | | for (__attribute__((cleanup(_reset_umask_))) struct umask_struct _s | |
| | | aved_umask_ = { umask(mask), false }; \ | |
| | | !_saved_umask_.quit ; \ | |
| | | _saved_umask_.quit = true) | |
| | | | |
| | | static inline unsigned u64log2(uint64_t n) { | |
| | | return (n > 1) ? __builtin_clzll(n) ^ 63U : 0; | |
| | | } | |
| | | | |
| | | static inline bool logind_running(void) { | |
| | | return access("/run/systemd/seats/", F_OK) >= 0; | |
| | | } | |
| | | | |
| | | int unlink_noerrno(const char *path); | |
| | | | |
End of changes. 7 change blocks. |
| 2 lines changed or deleted | | 8 lines changed or added | |
|