From: Sven Eden Date: Tue, 11 Apr 2017 15:28:25 +0000 (+0200) Subject: Prep v228: Condense elogind source masks (5/5) X-Git-Tag: v228.1~1^2~6 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=4084669c7f802c9745bcb6bed77bdaf49ffd896d Prep v228: Condense elogind source masks (5/5) --- diff --git a/Makefile.am b/Makefile.am index c36d718dd..2a0c76085 100644 --- a/Makefile.am +++ b/Makefile.am @@ -996,7 +996,7 @@ git-tar: for f in `find elogind-$(VERSION)-raw/ -type f | cut -d '/' -f 2-` ; do \ $(MKDIR_P) elogind-$(VERSION)/`dirname $$f` ; \ $(AWK) 'BEGIN { i=0;e=0 } \ - /^#if\s+0\s*$$/ { i=1;next } \ + /^#if\s+0.*elogind.*$$/ { i=1;next } \ /^#else\s*$$/ { \ { if ( i==1 ) e=1; else print }{next} \ } \ diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index 6b7b9f7d8..85bbc6703 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -1173,8 +1173,7 @@ int cg_mangle_path(const char *path, char **result) { } int cg_get_root_path(char **path) { -/// elogind does not support systemd scopes and slices -#if 0 +#if 0 /// elogind does not support systemd scopes and slices char *p, *e; int r; diff --git a/src/basic/fileio.c b/src/basic/fileio.c index 388bc1825..cd2c361e3 100644 --- a/src/basic/fileio.c +++ b/src/basic/fileio.c @@ -691,8 +691,7 @@ int load_env_file(FILE *f, const char *fname, const char *newline, char ***rl) { return 0; } -/// UNNEDED by elogind -#if 0 +#if 0 /// UNNEDED by elogind static int load_env_file_push_pairs( const char *filename, unsigned line, const char *key, char *value, diff --git a/src/basic/log.c b/src/basic/log.c index c957fa2f1..f928a9d5b 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -244,8 +244,7 @@ int log_open(void) { getpid() == 1 || isatty(STDERR_FILENO) <= 0) { -/// elogind does not support logging to systemd-journald -#if 0 +#if 0 /// elogind does not support logging to systemd-journald if (log_target == LOG_TARGET_AUTO || log_target == LOG_TARGET_JOURNAL_OR_KMSG || log_target == LOG_TARGET_JOURNAL) { @@ -292,8 +291,7 @@ void log_set_target(LogTarget target) { assert(target >= 0); assert(target < _LOG_TARGET_MAX); -/// elogind does not support logging to systemd-journald -#if 0 +#if 0 /// elogind does not support logging to systemd-journald if (upgrade_syslog_to_journal) { if (target == LOG_TARGET_SYSLOG) target = LOG_TARGET_JOURNAL; @@ -591,8 +589,7 @@ static int log_dispatch( if ((e = strpbrk(buffer, NEWLINE))) *(e++) = 0; -/// elogind does not support logging to systemd-journald -#if 0 +#if 0 /// elogind does not support logging to systemd-journald if (log_target == LOG_TARGET_AUTO || log_target == LOG_TARGET_JOURNAL_OR_KMSG || log_target == LOG_TARGET_JOURNAL) { @@ -837,8 +834,7 @@ int log_struct_internal( if ((level & LOG_FACMASK) == 0) level = log_facility | LOG_PRI(level); -/// elogind does not support logging to systemd-journald -#if 0 +#if 0 /// elogind does not support logging to systemd-journald if ((log_target == LOG_TARGET_AUTO || log_target == LOG_TARGET_JOURNAL_OR_KMSG || log_target == LOG_TARGET_JOURNAL) && @@ -1077,8 +1073,7 @@ static const char *const log_target_table[_LOG_TARGET_MAX] = { [LOG_TARGET_CONSOLE] = "console", [LOG_TARGET_CONSOLE_PREFIXED] = "console-prefixed", [LOG_TARGET_KMSG] = "kmsg", -/// elogind does not support logging to systemd-journald -#if 0 +#if 0 /// elogind does not support logging to systemd-journald [LOG_TARGET_JOURNAL] = "journal", [LOG_TARGET_JOURNAL_OR_KMSG] = "journal-or-kmsg", #endif // 0 diff --git a/src/basic/log.h b/src/basic/log.h index 1201022dd..0a7acb98e 100644 --- a/src/basic/log.h +++ b/src/basic/log.h @@ -36,8 +36,7 @@ typedef enum LogTarget{ LOG_TARGET_CONSOLE, LOG_TARGET_CONSOLE_PREFIXED, LOG_TARGET_KMSG, -/// elogind does not support logging to systemd-journald -#if 0 +#if 0 /// elogind does not support logging to systemd-journald LOG_TARGET_JOURNAL, LOG_TARGET_JOURNAL_OR_KMSG, #endif // 0 diff --git a/src/basic/selinux-util.c b/src/basic/selinux-util.c index 96f57eafb..044d4ee9f 100644 --- a/src/basic/selinux-util.c +++ b/src/basic/selinux-util.c @@ -173,8 +173,7 @@ int mac_selinux_fix(const char *path, bool ignore_enoent, bool ignore_erofs) { return 0; } -/// UNNEDED by elogind -#if 0 +#if 0 /// UNNEDED by elogind int mac_selinux_apply(const char *path, const char *label) { #ifdef HAVE_SELINUX diff --git a/src/core/cgroup.c b/src/core/cgroup.c index a8d3ae36b..76a3d2d25 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -1375,8 +1375,7 @@ int manager_setup_cgroup(Manager *m) { if (r < 0) return log_error_errno(r, "Cannot determine cgroup we are running in: %m"); -/// elogind does not support systemd scopes and slices -#if 0 +#if 0 /// elogind does not support systemd scopes and slices /* Chop off the init scope, if we are already located in it */ e = endswith(m->cgroup_root, "/" SPECIAL_INIT_SCOPE); @@ -1423,8 +1422,7 @@ int manager_setup_cgroup(Manager *m) { /* In the unified hierarchy we can can get * cgroup empty notifications via inotify. */ -/// elogind does not support the unified hierarchy, yet. -#if 0 +#if 0 /// elogind does not support the unified hierarchy, yet. m->cgroup_inotify_event_source = sd_event_source_unref(m->cgroup_inotify_event_source); safe_close(m->cgroup_inotify_fd); @@ -1462,8 +1460,7 @@ int manager_setup_cgroup(Manager *m) { log_debug("Release agent already installed."); } -/// elogind is not meant to run in systemd init scope -#if 0 +#if 0 /// elogind is not meant to run in systemd init scope /* 4. Make sure we are in the special "init.scope" unit in the root slice. */ scope_path = strjoina(m->cgroup_root, "/" SPECIAL_INIT_SCOPE); r = cg_create_and_attach(SYSTEMD_CGROUP_CONTROLLER, scope_path, 0); @@ -1521,8 +1518,7 @@ void manager_shutdown_cgroup(Manager *m, bool delete) { if (delete && m->cgroup_root) (void) cg_trim(SYSTEMD_CGROUP_CONTROLLER, m->cgroup_root, false); -/// elogind does not support the unified hierarchy, yet. -#if 0 +#if 0 /// elogind does not support the unified hierarchy, yet. m->cgroup_inotify_wd_unit = hashmap_free(m->cgroup_inotify_wd_unit); m->cgroup_inotify_event_source = sd_event_source_unref(m->cgroup_inotify_event_source); diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c index c0939b617..94598e998 100644 --- a/src/core/mount-setup.c +++ b/src/core/mount-setup.c @@ -377,8 +377,8 @@ int mount_setup(bool loaded_policy) { if (r < 0) return r; -/// elogind does not control /, /dev, /run and /run/systemd/* are setup elsewhere. -#if 0 + +#if 0 /// elogind does not control /, /dev, /run and /run/systemd/* are setup elsewhere. #if defined(HAVE_SELINUX) || defined(HAVE_SMACK) /* Nodes in devtmpfs and /run need to be manually updated for * the appropriate labels, after mounting. The other virtual diff --git a/src/libelogind/sd-bus/bus-creds.c b/src/libelogind/sd-bus/bus-creds.c index 4c109cdbd..d14e8b4ec 100644 --- a/src/libelogind/sd-bus/bus-creds.c +++ b/src/libelogind/sd-bus/bus-creds.c @@ -556,8 +556,7 @@ _public_ int sd_bus_creds_get_owner_uid(sd_bus_creds *c, uid_t *uid) { if (r < 0) return r; -/// elogind does not support systemd slices -#if 0 +#if 0 /// elogind does not support systemd slices return cg_path_get_owner_uid(shifted, uid); #else *uid = c->uid; diff --git a/src/libelogind/sd-bus/sd-bus.c b/src/libelogind/sd-bus/sd-bus.c index 4870bc70a..5b679c056 100644 --- a/src/libelogind/sd-bus/sd-bus.c +++ b/src/libelogind/sd-bus/sd-bus.c @@ -1164,8 +1164,7 @@ _public_ int sd_bus_open(sd_bus **ret) { if (e) { if (streq(e, "system")) return sd_bus_open_system(ret); -/// elogind does not support systemd units -#if 0 +#if 0 /// elogind does not support systemd units else if (STR_IN_SET(e, "session", "user")) return sd_bus_open_user(ret); #endif // 0 @@ -1173,8 +1172,7 @@ _public_ int sd_bus_open(sd_bus **ret) { e = secure_getenv("DBUS_STARTER_ADDRESS"); if (!e) { -/// elogind does not support systemd units -#if 0 +#if 0 /// elogind does not support systemd units if (cg_pid_get_owner_uid(0, NULL) >= 0) return sd_bus_open_user(ret); else @@ -1256,8 +1254,7 @@ fail: return r; } -/// elogind can not open/use a user bus -#if 0 +#if 0 /// elogind can not open/use a user bus int bus_set_address_user(sd_bus *b) { const char *e; uid_t uid; @@ -1293,8 +1290,7 @@ int bus_set_address_user(sd_bus *b) { #endif // 0 _public_ int sd_bus_open_user(sd_bus **ret) { -/// elogind does not support user buses -#if 0 +#if 0 /// elogind does not support user buses sd_bus *b; int r; @@ -3398,8 +3394,7 @@ _public_ int sd_bus_default_system(sd_bus **ret) { _public_ int sd_bus_default_user(sd_bus **ret) { -/// elogind does not support user buses -#if 0 +#if 0 /// elogind does not support user buses return bus_default(sd_bus_open_user, &default_user_bus, ret); #else return sd_bus_default_system(ret); @@ -3420,8 +3415,7 @@ _public_ int sd_bus_default(sd_bus **ret) { if (e) { if (streq(e, "system")) return sd_bus_default_system(ret); -/// elogind does not support systemd units -#if 0 +#if 0 /// elogind does not support systemd units else if (STR_IN_SET(e, "user", "session")) return sd_bus_default_user(ret); #endif // 0 @@ -3439,8 +3433,7 @@ _public_ int sd_bus_default(sd_bus **ret) { /* Finally, if nothing is set use the cached connection for * the right scope */ -/// elogind does not support systemd units -#if 0 +#if 0 /// elogind does not support systemd units if (cg_pid_get_owner_uid(0, NULL) >= 0) return sd_bus_default_user(ret); else diff --git a/src/libelogind/sd-login/sd-login.c b/src/libelogind/sd-login/sd-login.c index 671700b5e..ac22fa345 100644 --- a/src/libelogind/sd-login/sd-login.c +++ b/src/libelogind/sd-login/sd-login.c @@ -70,8 +70,7 @@ _public_ int sd_pid_get_unit(pid_t pid, char **unit) { assert_return(pid >= 0, -EINVAL); assert_return(unit, -EINVAL); -/// elogind does not support systemd units -#if 0 +#if 0 /// elogind does not support systemd units return cg_pid_get_unit(pid, unit); #else return -ESRCH; @@ -83,8 +82,7 @@ _public_ int sd_pid_get_user_unit(pid_t pid, char **unit) { assert_return(pid >= 0, -EINVAL); assert_return(unit, -EINVAL); -/// elogind does not support systemd units -#if 0 +#if 0 /// elogind does not support systemd units return cg_pid_get_user_unit(pid, unit); #else return -ESRCH; @@ -96,8 +94,7 @@ _public_ int sd_pid_get_machine_name(pid_t pid, char **name) { assert_return(pid >= 0, -EINVAL); assert_return(name, -EINVAL); -/// elogind does not support systemd units -#if 0 +#if 0 /// elogind does not support systemd units return cg_pid_get_machine_name(pid, name); #else return -ESRCH; @@ -109,8 +106,7 @@ _public_ int sd_pid_get_slice(pid_t pid, char **slice) { assert_return(pid >= 0, -EINVAL); assert_return(slice, -EINVAL); -/// elogind does not support systemd slices -#if 0 +#if 0 /// elogind does not support systemd slices return cg_pid_get_slice(pid, slice); #else return -ESRCH; @@ -122,8 +118,7 @@ _public_ int sd_pid_get_user_slice(pid_t pid, char **slice) { assert_return(pid >= 0, -EINVAL); assert_return(slice, -EINVAL); -/// elogind does not support systemd slices -#if 0 +#if 0 /// elogind does not support systemd slices return cg_pid_get_user_slice(pid, slice); #else return -ESRCH; @@ -135,8 +130,7 @@ _public_ int sd_pid_get_owner_uid(pid_t pid, uid_t *uid) { assert_return(pid >= 0, -EINVAL); assert_return(uid, -EINVAL); -/// elogind does not support systemd slices -#if 0 +#if 0 /// elogind does not support systemd slices return cg_pid_get_owner_uid(pid, uid); #else return -ESRCH; @@ -180,8 +174,7 @@ _public_ int sd_peer_get_session(int fd, char **session) { if (r < 0) return r; -/// elogind does not support systemd scopes -#if 0 +#if 0 /// elogind does not support systemd scopes return cg_pid_get_session(ucred.pid, session); #else return -ESRCH; @@ -199,8 +192,7 @@ _public_ int sd_peer_get_owner_uid(int fd, uid_t *uid) { if (r < 0) return r; -/// elogind does not support systemd units -#if 0 +#if 0 /// elogind does not support systemd units return cg_pid_get_owner_uid(ucred.pid, uid); #else return -ESRCH; @@ -218,8 +210,7 @@ _public_ int sd_peer_get_unit(int fd, char **unit) { if (r < 0) return r; -/// elogind does not support systemd units -#if 0 +#if 0 /// elogind does not support systemd units return cg_pid_get_unit(ucred.pid, unit); #else return -ESRCH; @@ -237,8 +228,7 @@ _public_ int sd_peer_get_user_unit(int fd, char **unit) { if (r < 0) return r; -/// elogind does not support systemd units -#if 0 +#if 0 /// elogind does not support systemd units return cg_pid_get_user_unit(ucred.pid, unit); #else return -ESRCH; @@ -256,8 +246,7 @@ _public_ int sd_peer_get_machine_name(int fd, char **machine) { if (r < 0) return r; -/// elogind does not support systemd units -#if 0 +#if 0 /// elogind does not support systemd units return cg_pid_get_machine_name(ucred.pid, machine); #else return -ESRCH; @@ -275,8 +264,7 @@ _public_ int sd_peer_get_slice(int fd, char **slice) { if (r < 0) return r; -/// elogind does not support systemd slices -#if 0 +#if 0 /// elogind does not support systemd slices return cg_pid_get_slice(ucred.pid, slice); #else return -ESRCH; @@ -294,8 +282,7 @@ _public_ int sd_peer_get_user_slice(int fd, char **slice) { if (r < 0) return r; -/// elogind does not support systemd slices -#if 0 +#if 0 /// elogind does not support systemd slices return cg_pid_get_user_slice(ucred.pid, slice); #else return -ESRCH; diff --git a/src/login/logind-action.c b/src/login/logind-action.c index 474b69628..ab197a0db 100644 --- a/src/login/logind-action.c +++ b/src/login/logind-action.c @@ -58,8 +58,7 @@ int manager_handle_action( [HANDLE_HYBRID_SLEEP] = "Hibernating and suspending..." }; -/// elogind does this itself. No target table required -#if 0 +#if 0 /// elogind does this itself. No target table required static const char * const target_table[_HANDLE_ACTION_MAX] = { [HANDLE_POWEROFF] = SPECIAL_POWEROFF_TARGET, [HANDLE_REBOOT] = SPECIAL_REBOOT_TARGET, @@ -165,8 +164,7 @@ int manager_handle_action( log_info("%s", message_table[handle]); -/// elogind uses its own variant, which can use the handle directly. -#if 0 +#if 0 /// elogind uses its own variant, which can use the handle directly. r = bus_manager_shutdown_or_sleep_now_or_later(m, target_table[handle], inhibit_operation, &error); #else r = bus_manager_shutdown_or_sleep_now_or_later(m, handle, inhibit_operation, &error); diff --git a/src/login/logind-core.c b/src/login/logind-core.c index c7d7cedf7..0420b547e 100644 --- a/src/login/logind-core.c +++ b/src/login/logind-core.c @@ -278,8 +278,7 @@ int manager_process_button_device(Manager *m, struct udev_device *d) { } int manager_get_session_by_pid(Manager *m, pid_t pid, Session **session) { -/// elogind does not support systemd units, but its own session system -#if 0 +#if 0 /// elogind does not support systemd units, but its own session system _cleanup_free_ char *unit = NULL; #else _cleanup_free_ char *session_name = NULL; @@ -292,8 +291,7 @@ int manager_get_session_by_pid(Manager *m, pid_t pid, Session **session) { if (pid < 1) return -EINVAL; -/// elogind does not support systemd units, but its own session system -#if 0 +#if 0 /// elogind does not support systemd units, but its own session system r = cg_pid_get_unit(pid, &unit); if (r < 0) return 0; @@ -318,8 +316,7 @@ int manager_get_session_by_pid(Manager *m, pid_t pid, Session **session) { } int manager_get_user_by_pid(Manager *m, pid_t pid, User **user) { -/// elogind does not support systemd units, but its own session system -#if 0 +#if 0 /// elogind does not support systemd units, but its own session system _cleanup_free_ char *unit = NULL; User *u; #else @@ -333,8 +330,7 @@ int manager_get_user_by_pid(Manager *m, pid_t pid, User **user) { if (pid < 1) return -EINVAL; -/// elogind does not support systemd units, but its own session system -#if 0 +#if 0 /// elogind does not support systemd units, but its own session system r = cg_pid_get_slice(pid, &unit); if (r < 0) return 0; diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 8f563268f..b549552ae 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -1367,8 +1367,7 @@ static int have_multiple_sessions( static int bus_manager_log_shutdown( Manager *m, InhibitWhat w, -/// elogind does not support systemd units -#if 0 +#if 0 /// elogind does not support systemd units const char *unit_name) { const char *p, *q; @@ -1504,8 +1503,7 @@ static int execute_shutdown_or_sleep( HandleAction action, sd_bus_error *error) { -/// elogind does not need these, we do it ourselves -#if 0 +#if 0 /// elogind does not need these, we do it ourselves _cleanup_bus_message_unref_ sd_bus_message *reply = NULL; char *c = NULL; const char *p; @@ -1518,8 +1516,7 @@ static int execute_shutdown_or_sleep( bus_manager_log_shutdown(m, w, action); -/// elogind does it directly without depending on systemd running the system -#if 0 +#if 0 /// elogind does it directly without depending on systemd running the system if (m->shutdown_dry_run) { log_info("Running in dry run, suppressing action."); reset_scheduled_shutdown(m); @@ -1539,8 +1536,7 @@ static int execute_shutdown_or_sleep( if (r < 0) return r; -/// elogind neither needs a dbus reply, nor supports systemd action jobs -#if 0 +#if 0 /// elogind neither needs a dbus reply, nor supports systemd action jobs r = sd_bus_message_read(reply, "o", &p); if (r < 0) return r; @@ -2052,8 +2048,7 @@ static int method_schedule_shutdown(sd_bus_message *message, void *userdata, sd_ } } -/// elogind does not support utmp-wtmp -#if 0 +#if 0 /// elogind does not support utmp-wtmp r = manager_setup_wall_message_timer(m); if (r < 0) return r; @@ -2079,8 +2074,7 @@ static int method_cancel_scheduled_shutdown(sd_bus_message *message, void *userd cancelled = m->scheduled_shutdown_type != NULL; reset_scheduled_shutdown(m); -/// elogind does not support utmp-wtmp -#if 0 +#if 0 /// elogind does not support utmp-wtmp if (cancelled) { _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL; const char *tty = NULL; @@ -2294,8 +2288,7 @@ static int property_get_reboot_to_firmware_setup( sd_bus_message *reply, void *userdata, sd_bus_error *error) { -/// elogind does not support EFI -#if 0 +#if 0 /// elogind does not support EFI int r; assert(bus); @@ -2340,8 +2333,7 @@ static int method_set_reboot_to_firmware_setup( if (r == 0) return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */ -/// elogind does not support EFI -#if 0 +#if 0 /// elogind does not support EFI r = efi_set_reboot_to_firmware(b); if (r < 0) return r; @@ -2355,8 +2347,7 @@ static int method_can_reboot_to_firmware_setup( void *userdata, sd_bus_error *error) { -/// elogind does not support EFI -#if 0 +#if 0 /// elogind does not support EFI int r; bool challenge; const char *result; diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index 6838d3699..813ab153e 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -175,8 +175,7 @@ int seat_load(Seat *s) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static int vt_allocate(unsigned int vtnr) { char p[sizeof("/dev/tty") + DECIMAL_STR_MAX(unsigned int)]; _cleanup_close_ int fd = -1; @@ -371,8 +370,7 @@ int seat_active_vt_changed(Seat *s, unsigned int vtnr) { r = seat_set_active(s, new_active); -/// elogind does not spawn autovt -#if 0 +#if 0 /// elogind does not spawn autovt manager_spawn_autovt(s->manager, vtnr); #endif // 0 @@ -433,8 +431,7 @@ int seat_start(Seat *s) { NULL); /* Initialize VT magic stuff */ -/// elogind does not support autospawning vts -#if 0 +#if 0 /// elogind does not support autospawning vts seat_preallocate_vts(s); #endif // 0 diff --git a/src/login/logind-seat.h b/src/login/logind-seat.h index 3e628cb78..ab2ef3e38 100644 --- a/src/login/logind-seat.h +++ b/src/login/logind-seat.h @@ -60,8 +60,7 @@ int seat_switch_to_next(Seat *s); int seat_switch_to_previous(Seat *s); int seat_active_vt_changed(Seat *s, unsigned int vtnr); int seat_read_active_vt(Seat *s); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int seat_preallocate_vts(Seat *s); #endif // 0 diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c index 0be2f8abe..fa99c24fe 100644 --- a/src/login/logind-session-dbus.c +++ b/src/login/logind-session-dbus.c @@ -705,8 +705,7 @@ int session_send_create_reply(Session *s, sd_bus_error *error) { if (!s->create_message) return 0; -/// elogind does not support scope and service jobs -#if 0 +#if 0 /// elogind does not support scope and service jobs if (!sd_bus_error_is_set(error) && (s->scope_job || s->user->service_job)) return 0; #endif // 0 diff --git a/src/login/logind-session.c b/src/login/logind-session.c index c53e9f9a5..5b7a67e33 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -133,8 +133,7 @@ void session_free(Session *s) { free(s->scope); } -/// elogind does not support systemd scope_jobs -#if 0 +#if 0 /// elogind does not support systemd scope_jobs free(s->scope_job); #endif // 0 @@ -207,8 +206,7 @@ int session_save(Session *s) { if (s->scope) fprintf(f, "SCOPE=%s\n", s->scope); -/// elogind does not support systemd scope_jobs -#if 0 +#if 0 /// elogind does not support systemd scope_jobs if (s->scope_job) fprintf(f, "SCOPE_JOB=%s\n", s->scope_job); #endif // 0 @@ -338,8 +336,7 @@ int session_load(Session *s) { r = parse_env_file(s->state_file, NEWLINE, "REMOTE", &remote, "SCOPE", &s->scope, -/// elogind does not support systemd scope_jobs -#if 0 +#if 0 /// elogind does not support systemd scope_jobs "SCOPE_JOB", &s->scope_job, #endif // 0 "FIFO", &s->fifo_path, @@ -516,8 +513,7 @@ int session_activate(Session *s) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static int session_start_scope(Session *s) { int r; @@ -648,8 +644,7 @@ int session_start(Session *s) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static int session_stop_scope(Session *s, bool force) { _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; char *job = NULL; @@ -713,8 +708,7 @@ int session_stop(Session *s, bool force) { session_remove_fifo(s); /* Kill cgroup */ -/// elogind does not start scopes, but sessions -#if 0 +#if 0 /// elogind does not start scopes, but sessions r = session_stop_scope(s, force); #else r = session_stop_cgroup(s, force); @@ -779,8 +773,7 @@ int session_finalize(Session *s) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static int release_timeout_callback(sd_event_source *es, uint64_t usec, void *userdata) { Session *s = userdata; @@ -1017,8 +1010,7 @@ bool session_check_gc(Session *s, bool drop_not_started) { return true; } -/// elogind supports neither scopes nor jobs -#if 0 +#if 0 /// elogind supports neither scopes nor jobs if (s->scope_job && manager_job_is_active(s->manager, s->scope_job)) return true; @@ -1050,8 +1042,7 @@ SessionState session_get_state(Session *s) { if (s->stopping || s->timer_event_source) return SESSION_CLOSING; -/// elogind does not support systemd scope_jobs -#if 0 +#if 0 /// elogind does not support systemd scope_jobs if (s->scope_job || s->fifo_fd < 0) #else if (s->fifo_fd < 0) @@ -1067,8 +1058,7 @@ SessionState session_get_state(Session *s) { int session_kill(Session *s, KillWho who, int signo) { assert(s); -/// Without direct cgroup support, elogind can not kill sessions -#if 0 +#if 0 /// Without direct cgroup support, elogind can not kill sessions if (!s->scope) return -ESRCH; diff --git a/src/login/logind-session.h b/src/login/logind-session.h index 202446833..b047d81ad 100644 --- a/src/login/logind-session.h +++ b/src/login/logind-session.h @@ -91,8 +91,7 @@ struct Session { /* always NULL */ char *scope; -/// UNNEEDED (and unsupported) by elogind -#if 0 +#if 0 /// UNNEEDED by elogind char *scope_job; #endif // 0 diff --git a/src/login/logind-user.c b/src/login/logind-user.c index ecc61080a..110fb7e45 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -122,8 +122,7 @@ User *user_free(User *u) { hashmap_remove_value(u->manager->users, UID_TO_PTR(u->uid), u); -/// elogind neither supports slice nor service jobs. -#if 0 +#if 0 /// elogind neither supports slice nor service jobs. u->slice_job = mfree(u->slice_job); u->service_job = mfree(u->service_job); #endif // 0 @@ -165,8 +164,7 @@ static int user_save_internal(User *u) { if (u->runtime_path) fprintf(f, "RUNTIME=%s\n", u->runtime_path); -/// elogind neither supports service nor slice jobs -#if 0 +#if 0 /// elogind neither supports service nor slice jobs if (u->service_job) fprintf(f, "SERVICE_JOB=%s\n", u->service_job); @@ -308,8 +306,7 @@ int user_load(User *u) { assert(u); r = parse_env_file(u->state_file, NEWLINE, -/// elogind neither supports service nor slice jobs -#if 0 +#if 0 /// elogind neither supports service nor slice jobs "SERVICE_JOB", &u->service_job, "SLICE_JOB", &u->slice_job, #endif // 0 @@ -401,8 +398,7 @@ fail: } static int user_start_slice(User *u) { -/// elogind can not ask systemd via dbus to start user services -#if 0 +#if 0 /// elogind can not ask systemd via dbus to start user services _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; const char *description; char *job; @@ -439,8 +435,7 @@ static int user_start_slice(User *u) { } static int user_start_service(User *u) { -/// elogind can not ask systemd via dbus to start user services -#if 0 +#if 0 /// elogind can not ask systemd via dbus to start user services _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; char *job; int r; @@ -530,8 +525,7 @@ int user_start(User *u) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static int user_stop_slice(User *u) { _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; char *job; @@ -612,8 +606,7 @@ int user_stop(User *u, bool force) { } /* Kill systemd */ -/// elogind does not support service or slice jobs -#if 0 +#if 0 /// elogind does not support service or slice jobs k = user_stop_service(u); if (k < 0) r = k; @@ -730,8 +723,7 @@ bool user_check_gc(User *u, bool drop_not_started) { if (user_check_linger_file(u) > 0) return true; -/// elogind neither supports service nor slice jobs -#if 0 +#if 0 /// elogind neither supports service nor slice jobs if (u->slice_job && manager_job_is_active(u->manager, u->slice_job)) return true; @@ -760,8 +752,7 @@ UserState user_get_state(User *u) { if (u->stopping) return USER_CLOSING; -/// elogind neither supports service nor slice jobs. -#if 0 +#if 0 /// elogind neither supports service nor slice jobs. if (!u->started || u->slice_job || u->service_job) #else if (!u->started) @@ -791,8 +782,7 @@ UserState user_get_state(User *u) { } int user_kill(User *u, int signo) { -/// Without systemd unit support, elogind has to rely on its session system -#if 0 +#if 0 /// Without systemd unit support, elogind has to rely on its session system assert(u); return manager_kill_unit(u->manager, u->slice, KILL_ALL, signo, NULL); diff --git a/src/login/logind-user.h b/src/login/logind-user.h index a59b11b2a..7a0945e31 100644 --- a/src/login/logind-user.h +++ b/src/login/logind-user.h @@ -51,8 +51,8 @@ struct User { char *slice; char *service; -/// UNNEEDED (and unsupported) by elogind -#if 0 + +#if 0 /// UNNEEDED by elogind char *service_job; char *slice_job; #endif // 0 diff --git a/src/login/logind.c b/src/login/logind.c index 8693627f2..205d38143 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -60,8 +60,7 @@ static Manager *manager_new(void) { m->console_active_fd = -1; -/// elogind does not support autospawning of vts -#if 0 +#if 0 /// elogind does not support autospawning of vts m->reserve_vt_fd = -1; m->n_autovts = 6; @@ -218,8 +217,7 @@ static void manager_free(Manager *m) { sd_bus_unref(m->bus); sd_event_unref(m->event); -/// elogind does not support autospawning of vts -#if 0 +#if 0 /// elogind does not support autospawning of vts safe_close(m->reserve_vt_fd); #endif // 0 @@ -564,8 +562,7 @@ static int manager_dispatch_device_udev(sd_event_source *s, int fd, uint32_t rev return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static int manager_dispatch_vcsa_udev(sd_event_source *s, int fd, uint32_t revents, void *userdata) { _cleanup_udev_device_unref_ struct udev_device *d = NULL; Manager *m = userdata; @@ -614,8 +611,7 @@ static int manager_dispatch_console(sd_event_source *s, int fd, uint32_t revents return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static int manager_reserve_vt(Manager *m) { _cleanup_free_ char *p = NULL; @@ -715,8 +711,7 @@ static int manager_connect_bus(Manager *m) { if (r < 0) return log_error_errno(r, "Failed to add user enumerator: %m"); -/// elogind does not support systemd as PID 1 -#if 0 +#if 0 /// elogind does not support systemd as PID 1 r = sd_bus_add_match(m->bus, NULL, "type='signal'," @@ -955,8 +950,7 @@ static int manager_connect_udev(Manager *m) { } /* Don't bother watching VCSA devices, if nobody cares */ -/// elogind does not support autospawning of vts -#if 0 +#if 0 /// elogind does not support autospawning of vts if (m->n_autovts > 0 && m->console_active_fd >= 0) { m->udev_vcsa_monitor = udev_monitor_new_from_netlink(m->udev, "udev"); @@ -1155,8 +1149,7 @@ static int manager_startup(Manager *m) { manager_gc(m, false); /* Reserve the special reserved VT */ -/// elogind does not support autospawning of vts -#if 0 +#if 0 /// elogind does not support autospawning of vts manager_reserve_vt(m); #endif // 0 @@ -1208,8 +1201,7 @@ static int manager_run(Manager *m) { } static int manager_parse_config_file(Manager *m) { -/// elogind parses its own config file -#if 0 +#if 0 /// elogind parses its own config file assert(m); @@ -1263,8 +1255,7 @@ int main(int argc, char *argv[]) { * existence of /run/systemd/seats/ to determine whether * logind is available, so please always make sure this check * stays in. */ -/// elogind can not rely on systemd to help, so we need a bit more effort than this -#if 0 +#if 0 /// elogind can not rely on systemd to help, so we need a bit more effort than this mkdir_label("/run/systemd/seats", 0755); mkdir_label("/run/systemd/users", 0755); mkdir_label("/run/systemd/sessions", 0755); diff --git a/src/login/logind.h b/src/login/logind.h index ebd6944d8..aa53d314a 100644 --- a/src/login/logind.h +++ b/src/login/logind.h @@ -78,8 +78,7 @@ struct Manager { int console_active_fd; -/// elogind does not support autospawning of vts -#if 0 +#if 0 /// elogind does not support autospawning of vts unsigned n_autovts; unsigned reserve_vt; @@ -103,8 +102,7 @@ struct Manager { * this is != 0 and encodes what is being done */ InhibitWhat action_what; -/// elogind does all relevant actions on its own. No systemd jobs and units. -#if 0 +#if 0 /// elogind does all relevant actions on its own. No systemd jobs and units. /* If a shutdown/suspend was delayed due to a inhibitor this contains the unit name we are supposed to start after the delay is over */ @@ -179,8 +177,7 @@ int manager_add_inhibitor(Manager *m, const char* id, Inhibitor **_inhibitor); int manager_process_seat_device(Manager *m, struct udev_device *d); int manager_process_button_device(Manager *m, struct udev_device *d); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int manager_spawn_autovt(Manager *m, unsigned int vtnr); #endif // 0 @@ -195,8 +192,7 @@ bool manager_is_docked_or_external_displays(Manager *m); extern const sd_bus_vtable manager_vtable[]; -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int match_job_removed(sd_bus_message *message, void *userdata, sd_bus_error *error); int match_unit_removed(sd_bus_message *message, void *userdata, sd_bus_error *error); int match_properties_changed(sd_bus_message *message, void *userdata, sd_bus_error *error); @@ -211,9 +207,9 @@ int bus_manager_shutdown_or_sleep_now_or_later(Manager *m, HandleAction action, int manager_send_changed(Manager *manager, const char *property, ...) _sentinel_; -/// UNNEEDED by elogind -#if 0 -int manager_start_slice(Manager *manager, const char *slice, const char *description, const char *after, const char *after2, uint64_t tasks_max, sd_bus_error *error, char **job);// UNNEEDED int manager_start_scope(Manager *manager, const char *scope, pid_t pid, const char *slice, const char *description, const char *after, const char *after2, sd_bus_error *error, char **job); +#if 0 /// UNNEEDED by elogind +int manager_start_slice(Manager *manager, const char *slice, const char *description, const char *after, const char *after2, uint64_t tasks_max, sd_bus_error *error, char **job); +int manager_start_scope(Manager *manager, const char *scope, pid_t pid, const char *slice, const char *description, const char *after, const char *after2, sd_bus_error *error, char **job); int manager_start_unit(Manager *manager, const char *unit, sd_bus_error *error, char **job); int manager_stop_unit(Manager *manager, const char *unit, sd_bus_error *error, char **job); int manager_abandon_scope(Manager *manager, const char *scope, sd_bus_error *error); @@ -233,8 +229,7 @@ int manager_get_session_from_creds(Manager *m, sd_bus_message *message, const ch int manager_get_user_from_creds(Manager *m, sd_bus_message *message, uid_t uid, sd_bus_error *error, User **ret); int manager_get_seat_from_creds(Manager *m, sd_bus_message *message, const char *name, sd_bus_error *error, Seat **ret); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int manager_setup_wall_message_timer(Manager *m); bool logind_wall_tty_filter(const char *tty, void *userdata); #endif // 0 diff --git a/src/shared/acl-util.c b/src/shared/acl-util.c index f6e19dcb2..583cb017d 100644 --- a/src/shared/acl-util.c +++ b/src/shared/acl-util.c @@ -68,8 +68,7 @@ int acl_find_uid(acl_t acl, uid_t uid, acl_entry_t *entry) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int calc_acl_mask_if_needed(acl_t *acl_p) { acl_entry_t i; int r; diff --git a/src/shared/acl-util.h b/src/shared/acl-util.h index 10c3ec371..f6a9a4a8e 100644 --- a/src/shared/acl-util.h +++ b/src/shared/acl-util.h @@ -30,8 +30,7 @@ #include "macro.h" int acl_find_uid(acl_t acl, uid_t uid, acl_entry_t *entry); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int calc_acl_mask_if_needed(acl_t *acl_p); int add_base_acls_if_needed(acl_t *acl_p, const char *path); int acl_search_groups(const char* path, char ***ret_groups); diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index c7e51a11b..e5613df6e 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -54,8 +54,7 @@ #include "utf8.h" #include "util.h" -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { sd_event *e = userdata; @@ -565,8 +564,7 @@ void bus_verify_polkit_async_registry_free(Hashmap *registry) { #endif } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_check_peercred(sd_bus *c) { struct ucred ucred; socklen_t l; @@ -1160,8 +1158,7 @@ int bus_message_map_all_properties( return sd_bus_message_exit_container(m); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_message_map_properties_changed( sd_bus_message *m, const struct bus_properties_map *map, @@ -1243,8 +1240,7 @@ int bus_connect_transport(BusTransport transport, const char *host, bool user, s switch (transport) { case BUS_TRANSPORT_LOCAL: -/// elogind does not support a user bus -#if 0 +#if 0 /// elogind does not support a user bus if (user) r = sd_bus_default_user(bus); else @@ -1268,8 +1264,7 @@ int bus_connect_transport(BusTransport transport, const char *host, bool user, s return r; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_connect_transport_systemd(BusTransport transport, const char *host, bool user, sd_bus **bus) { int r; @@ -1370,8 +1365,7 @@ int bus_log_parse_error(int r) { return log_error_errno(r, "Failed to parse bus message: %m"); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_log_create_error(int r) { return log_error_errno(r, "Failed to create bus message: %m"); } @@ -1870,8 +1864,7 @@ typedef struct BusWaitForJobs { sd_bus_slot *slot_disconnected; } BusWaitForJobs; -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static int match_disconnected(sd_bus_message *m, void *userdata, sd_bus_error *error) { assert(m); @@ -2356,8 +2349,7 @@ bool is_kdbus_available(void) { return ioctl(fd, KDBUS_CMD_BUS_MAKE, &cmd) >= 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_property_get_rlimit( sd_bus *bus, const char *path, diff --git a/src/shared/bus-util.h b/src/shared/bus-util.h index 47811a744..8e92e447d 100644 --- a/src/shared/bus-util.h +++ b/src/shared/bus-util.h @@ -49,28 +49,24 @@ struct bus_properties_map { int bus_map_id128(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus_error *error, void *userdata); int bus_message_map_all_properties(sd_bus_message *m, const struct bus_properties_map *map, void *userdata); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_message_map_properties_changed(sd_bus_message *m, const struct bus_properties_map *map, void *userdata); #endif // 0 int bus_map_all_properties(sd_bus *bus, const char *destination, const char *path, const struct bus_properties_map *map, void *userdata); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_async_unregister_and_exit(sd_event *e, sd_bus *bus, const char *name); #endif // 0 typedef bool (*check_idle_t)(void *userdata); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_event_loop_with_idle(sd_event *e, sd_bus *bus, const char *name, usec_t timeout, check_idle_t check_idle, void *userdata); #endif // 0 int bus_name_has_owner(sd_bus *c, const char *name, sd_bus_error *error); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_check_peercred(sd_bus *c); #endif // 0 @@ -79,15 +75,13 @@ int bus_test_polkit(sd_bus_message *call, int capability, const char *action, co int bus_verify_polkit_async(sd_bus_message *call, int capability, const char *action, const char **details, bool interactive, uid_t good_user, Hashmap **registry, sd_bus_error *error); void bus_verify_polkit_async_registry_free(Hashmap *registry); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_open_system_systemd(sd_bus **_bus); int bus_open_user_systemd(sd_bus **_bus); #endif // 0 int bus_connect_transport(BusTransport transport, const char *host, bool user, sd_bus **bus); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind bus_connect_transport_systemd(BusTransport transport, const char *host, bool user, sd_bus **bus); #endif // 0 @@ -139,8 +133,7 @@ assert_cc(sizeof(mode_t) == sizeof(uint32_t)); int bus_log_parse_error(int r); int bus_log_create_error(int r); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind typedef struct UnitInfo { const char *machine; const char *id; @@ -204,8 +197,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_track*, sd_bus_track_unref); SD_BUS_PROPERTY(name, "t", bus_property_get_usec, (offset) + offsetof(struct dual_timestamp, realtime), (flags)), \ SD_BUS_PROPERTY(name "Monotonic", "t", bus_property_get_usec, (offset) + offsetof(struct dual_timestamp, monotonic), (flags)) -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignment); typedef struct BusWaitForJobs BusWaitForJobs; @@ -227,7 +219,6 @@ int bus_path_decode_unique(const char *path, const char *prefix, char **ret_send bool is_kdbus_wanted(void); bool is_kdbus_available(void); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_property_get_rlimit(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *error); #endif // 0 diff --git a/src/shared/clean-ipc.c b/src/shared/clean-ipc.c index d2e0240a8..6d35e4ca2 100644 --- a/src/shared/clean-ipc.c +++ b/src/shared/clean-ipc.c @@ -277,8 +277,7 @@ static int clean_posix_shm(uid_t uid) { return clean_posix_shm_internal(dir, uid); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static int clean_posix_mq(uid_t uid) { _cleanup_closedir_ DIR *dir = NULL; struct dirent *de; @@ -355,8 +354,8 @@ int clean_ipc(uid_t uid) { if (r < 0) ret = r; -/// elogind does not use mq_open anywhere -#if 0 + +#if 0 /// elogind does not use mq_open anywhere r = clean_posix_mq(uid); if (r < 0) ret = r; diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 0899509d7..fa5a5da67 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -459,8 +459,7 @@ DEFINE_PARSER(uint32, uint32_t, safe_atou32); DEFINE_PARSER(uint64, uint64_t, safe_atou64); DEFINE_PARSER(unsigned, unsigned, safe_atou); DEFINE_PARSER(double, double, safe_atod); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind DEFINE_PARSER(nsec, nsec_t, parse_nsec); #endif // 0 DEFINE_PARSER(sec, usec_t, parse_sec); @@ -496,8 +495,7 @@ int config_parse_iec_size(const char* unit, return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int config_parse_si_size(const char* unit, const char *filename, unsigned line, @@ -584,8 +582,7 @@ int config_parse_bool(const char* unit, return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int config_parse_tristate( const char* unit, const char *filename, @@ -759,8 +756,7 @@ int config_parse_strv(const char *unit, return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int config_parse_log_facility( const char *unit, const char *filename, @@ -852,8 +848,7 @@ int config_parse_signal( return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int config_parse_personality( const char *unit, const char *filename, diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h index 23cdc7293..cc5bd096b 100644 --- a/src/shared/conf-parser.h +++ b/src/shared/conf-parser.h @@ -108,33 +108,28 @@ int config_parse_uint32(const char *unit, const char *filename, unsigned line, c int config_parse_uint64(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_double(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_iec_size(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int config_parse_si_size(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_iec_off(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); #endif // 0 int config_parse_bool(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int config_parse_tristate(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); #endif // 0 int config_parse_string(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_path(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_strv(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_sec(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int config_parse_nsec(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); #endif // 0 int config_parse_mode(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int config_parse_log_facility(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); #endif // 0 int config_parse_log_level(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_signal(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int config_parse_personality(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); #endif // 0 diff --git a/src/shared/output-mode.h b/src/shared/output-mode.h index 6a61d3120..83485b628 100644 --- a/src/shared/output-mode.h +++ b/src/shared/output-mode.h @@ -21,8 +21,7 @@ along with systemd; If not, see . ***/ -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind typedef enum OutputMode { OUTPUT_SHORT, OUTPUT_SHORT_ISO, diff --git a/src/shared/pager.c b/src/shared/pager.c index de30de9e7..f2c34459a 100644 --- a/src/shared/pager.c +++ b/src/shared/pager.c @@ -170,8 +170,7 @@ bool pager_have(void) { return pager_pid > 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int show_man_page(const char *desc, bool null_stdio) { const char *args[4] = { "man", NULL, NULL, NULL }; char *e = NULL; diff --git a/src/shared/pager.h b/src/shared/pager.h index 03bdf82a6..ebf1c19aa 100644 --- a/src/shared/pager.h +++ b/src/shared/pager.h @@ -29,7 +29,6 @@ int pager_open(bool jump_to_end); void pager_close(void); bool pager_have(void) _pure_; -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int show_man_page(const char *page, bool null_stdio); #endif // 0 diff --git a/src/shared/path-lookup.h b/src/shared/path-lookup.h index 9bccaf640..84f90b895 100644 --- a/src/shared/path-lookup.h +++ b/src/shared/path-lookup.h @@ -34,8 +34,7 @@ typedef enum ManagerRunningAs { _MANAGER_RUNNING_AS_INVALID = -1 } ManagerRunningAs; -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int user_config_home(char **config_home); int user_runtime_dir(char **runtime_dir); diff --git a/src/shared/udev-util.h b/src/shared/udev-util.h index 4153b5b2d..a83daa7f1 100644 --- a/src/shared/udev-util.h +++ b/src/shared/udev-util.h @@ -27,8 +27,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev*, udev_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_device*, udev_device_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_enumerate*, udev_enumerate_unref); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_event*, udev_event_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_rules*, udev_rules_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ctrl*, udev_ctrl_unref); @@ -40,8 +39,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_monitor*, udev_monitor_unref); #define _cleanup_udev_unref_ _cleanup_(udev_unrefp) #define _cleanup_udev_device_unref_ _cleanup_(udev_device_unrefp) #define _cleanup_udev_enumerate_unref_ _cleanup_(udev_enumerate_unrefp) -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind #define _cleanup_udev_event_unref_ _cleanup_(udev_event_unrefp) #define _cleanup_udev_rules_unref_ _cleanup_(udev_rules_unrefp) #define _cleanup_udev_ctrl_unref_ _cleanup_(udev_ctrl_unrefp) diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h index 57f9bc80f..b23a7d21e 100644 --- a/src/systemd/sd-bus.h +++ b/src/systemd/sd-bus.h @@ -127,8 +127,7 @@ int sd_bus_new(sd_bus **ret); int sd_bus_set_address(sd_bus *bus, const char *address); int sd_bus_set_fd(sd_bus *bus, int input_fd, int output_fd); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]); int sd_bus_get_address(sd_bus *bus, const char **address); int sd_bus_set_bus_client(sd_bus *bus, int b); @@ -148,13 +147,11 @@ int sd_bus_negotiate_timestamp(sd_bus *bus, int b); int sd_bus_negotiate_fds(sd_bus *bus, int b); #endif // 0 int sd_bus_can_send(sd_bus *bus, char type); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_get_creds_mask(sd_bus *bus, uint64_t *creds_mask); #endif // 0 int sd_bus_set_allow_interactive_authorization(sd_bus *bus, int b); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_get_allow_interactive_authorization(sd_bus *bus); #endif // 0 @@ -167,8 +164,7 @@ sd_bus *sd_bus_ref(sd_bus *bus); sd_bus *sd_bus_unref(sd_bus *bus); sd_bus *sd_bus_flush_close_unref(sd_bus *bus); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind void sd_bus_default_flush_close(void); int sd_bus_get_bus_id(sd_bus *bus, sd_id128_t *id); @@ -178,29 +174,25 @@ int sd_bus_get_tid(sd_bus *bus, pid_t *tid); int sd_bus_get_owner_creds(sd_bus *bus, uint64_t creds_mask, sd_bus_creds **ret); int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *cookie); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_send_to(sd_bus *bus, sd_bus_message *m, const char *destination, uint64_t *cookie); #endif // 0 int sd_bus_call(sd_bus *bus, sd_bus_message *m, uint64_t usec, sd_bus_error *ret_error, sd_bus_message **reply); int sd_bus_call_async(sd_bus *bus, sd_bus_slot **slot, sd_bus_message *m, sd_bus_message_handler_t callback, void *userdata, uint64_t usec); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_get_fd(sd_bus *bus); #endif // 0 int sd_bus_get_events(sd_bus *bus); int sd_bus_get_timeout(sd_bus *bus, uint64_t *timeout_usec); int sd_bus_process(sd_bus *bus, sd_bus_message **r); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_process_priority(sd_bus *bus, int64_t max_priority, sd_bus_message **r); #endif // 0 int sd_bus_wait(sd_bus *bus, uint64_t timeout_usec); int sd_bus_flush(sd_bus *bus); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind sd_bus_slot* sd_bus_get_current_slot(sd_bus *bus); #endif // 0 sd_bus_message* sd_bus_get_current_message(sd_bus *bus); @@ -211,8 +203,7 @@ int sd_bus_attach_event(sd_bus *bus, sd_event *e, int priority); int sd_bus_detach_event(sd_bus *bus); sd_event *sd_bus_get_event(sd_bus *bus); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_add_filter(sd_bus *bus, sd_bus_slot **slot, sd_bus_message_handler_t callback, void *userdata); #endif // 0 int sd_bus_add_match(sd_bus *bus, sd_bus_slot **slot, const char *match, sd_bus_message_handler_t callback, void *userdata); @@ -221,8 +212,7 @@ int sd_bus_add_fallback(sd_bus *bus, sd_bus_slot **slot, const char *prefix, sd_ int sd_bus_add_object_vtable(sd_bus *bus, sd_bus_slot **slot, const char *path, const char *interface, const sd_bus_vtable *vtable, void *userdata); int sd_bus_add_fallback_vtable(sd_bus *bus, sd_bus_slot **slot, const char *prefix, const char *interface, const sd_bus_vtable *vtable, sd_bus_object_find_t find, void *userdata); int sd_bus_add_node_enumerator(sd_bus *bus, sd_bus_slot **slot, const char *path, sd_bus_node_enumerator_t callback, void *userdata); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_add_object_manager(sd_bus *bus, sd_bus_slot **slot, const char *path); #endif // 0 @@ -231,8 +221,7 @@ int sd_bus_add_object_manager(sd_bus *bus, sd_bus_slot **slot, const char *path) sd_bus_slot* sd_bus_slot_ref(sd_bus_slot *slot); sd_bus_slot* sd_bus_slot_unref(sd_bus_slot *slot); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind sd_bus* sd_bus_slot_get_bus(sd_bus_slot *slot); void *sd_bus_slot_get_userdata(sd_bus_slot *slot); void *sd_bus_slot_set_userdata(sd_bus_slot *slot, void *userdata); @@ -252,16 +241,14 @@ int sd_bus_message_new_method_return(sd_bus_message *call, sd_bus_message **m); int sd_bus_message_new_method_error(sd_bus_message *call, sd_bus_message **m, const sd_bus_error *e); int sd_bus_message_new_method_errorf(sd_bus_message *call, sd_bus_message **m, const char *name, const char *format, ...) _sd_printf_(4, 5); int sd_bus_message_new_method_errno(sd_bus_message *call, sd_bus_message **m, int error, const sd_bus_error *e); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_message_new_method_errnof(sd_bus_message *call, sd_bus_message **m, int error, const char *format, ...) _sd_printf_(4, 5); #endif // 0 sd_bus_message* sd_bus_message_ref(sd_bus_message *m); sd_bus_message* sd_bus_message_unref(sd_bus_message *m); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_message_get_type(sd_bus_message *m, uint8_t *type); int sd_bus_message_get_cookie(sd_bus_message *m, uint64_t *cookie); int sd_bus_message_get_reply_cookie(sd_bus_message *m, uint64_t *cookie); @@ -282,8 +269,7 @@ const char *sd_bus_message_get_sender(sd_bus_message *m); const sd_bus_error *sd_bus_message_get_error(sd_bus_message *m); int sd_bus_message_get_errno(sd_bus_message *m); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_message_get_monotonic_usec(sd_bus_message *m, uint64_t *usec); int sd_bus_message_get_realtime_usec(sd_bus_message *m, uint64_t *usec); int sd_bus_message_get_seqnum(sd_bus_message *m, uint64_t* seqnum); @@ -292,14 +278,12 @@ int sd_bus_message_get_seqnum(sd_bus_message *m, uint64_t* seqnum); sd_bus* sd_bus_message_get_bus(sd_bus_message *m); sd_bus_creds *sd_bus_message_get_creds(sd_bus_message *m); /* do not unref the result */ -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_message_is_signal(sd_bus_message *m, const char *interface, const char *member); #endif // 0 int sd_bus_message_is_method_call(sd_bus_message *m, const char *interface, const char *member); int sd_bus_message_is_method_error(sd_bus_message *m, const char *name); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_message_is_empty(sd_bus_message *m); int sd_bus_message_has_signature(sd_bus_message *m, const char *signature); @@ -309,15 +293,13 @@ int sd_bus_message_set_allow_interactive_authorization(sd_bus_message *m, int b) #endif // 0 int sd_bus_message_set_destination(sd_bus_message *m, const char *destination); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_message_set_priority(sd_bus_message *m, int64_t priority); #endif // 0 int sd_bus_message_append(sd_bus_message *m, const char *types, ...); int sd_bus_message_append_basic(sd_bus_message *m, char type, const void *p); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_message_append_array(sd_bus_message *m, char type, const void *ptr, size_t size); int sd_bus_message_append_array_space(sd_bus_message *m, char type, size_t size, void **ptr); int sd_bus_message_append_array_iovec(sd_bus_message *m, char type, const struct iovec *iov, unsigned n); @@ -339,8 +321,7 @@ int sd_bus_message_skip(sd_bus_message *m, const char *types); 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_peek_type(sd_bus_message *m, char *type, const char **contents); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_message_verify_type(sd_bus_message *m, char type, const char *contents); int sd_bus_message_at_end(sd_bus_message *m, int complete); #endif // 0 @@ -353,25 +334,21 @@ int sd_bus_request_name(sd_bus *bus, const char *name, uint64_t flags); int sd_bus_release_name(sd_bus *bus, const char *name); int sd_bus_list_names(sd_bus *bus, char ***acquired, char ***activatable); /* free the results */ int sd_bus_get_name_creds(sd_bus *bus, const char *name, uint64_t mask, sd_bus_creds **creds); /* unref the result! */ -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_get_name_machine_id(sd_bus *bus, const char *name, sd_id128_t *machine); #endif // 0 /* Convenience calls */ int sd_bus_call_method(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, sd_bus_message **reply, const char *types, ...); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_call_method_async(sd_bus *bus, sd_bus_slot **slot, const char *destination, const char *path, const char *interface, const char *member, sd_bus_message_handler_t callback, void *userdata, const char *types, ...); #endif // 0 int sd_bus_get_property(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, sd_bus_message **reply, const char *type); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_get_property_trivial(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char type, void *ret_ptr); #endif // 0 int sd_bus_get_property_string(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char **ret); /* free the result! */ -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_get_property_strv(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char ***ret); /* free the result! */ int sd_bus_set_property(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, const char *type, ...); #endif // 0 @@ -380,8 +357,7 @@ int sd_bus_reply_method_return(sd_bus_message *call, const char *types, ...); int sd_bus_reply_method_error(sd_bus_message *call, const sd_bus_error *e); int sd_bus_reply_method_errorf(sd_bus_message *call, const char *name, const char *format, ...) _sd_printf_(3, 4); int sd_bus_reply_method_errno(sd_bus_message *call, int error, const sd_bus_error *e); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_reply_method_errnof(sd_bus_message *call, int error, const char *format, ...) _sd_printf_(3, 4); #endif // 0 @@ -391,8 +367,7 @@ int sd_bus_emit_properties_changed_strv(sd_bus *bus, const char *path, const cha int sd_bus_emit_properties_changed(sd_bus *bus, const char *path, const char *interface, const char *name, ...) _sd_sentinel_; int sd_bus_emit_object_added(sd_bus *bus, const char *path); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_emit_object_removed(sd_bus *bus, const char *path); #endif // 0 int sd_bus_emit_interfaces_added_strv(sd_bus *bus, const char *path, char **interfaces); @@ -405,35 +380,30 @@ int sd_bus_query_sender_privilege(sd_bus_message *call, int capability); /* Credential handling */ -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_creds_new_from_pid(sd_bus_creds **ret, pid_t pid, uint64_t creds_mask); #endif // 0 sd_bus_creds *sd_bus_creds_ref(sd_bus_creds *c); sd_bus_creds *sd_bus_creds_unref(sd_bus_creds *c); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind uint64_t sd_bus_creds_get_mask(const sd_bus_creds *c); #endif // 0 uint64_t sd_bus_creds_get_augmented_mask(const sd_bus_creds *c); int sd_bus_creds_get_pid(sd_bus_creds *c, pid_t *pid); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_creds_get_ppid(sd_bus_creds *c, pid_t *ppid); #endif // 0 int sd_bus_creds_get_tid(sd_bus_creds *c, pid_t *tid); int sd_bus_creds_get_uid(sd_bus_creds *c, uid_t *uid); int sd_bus_creds_get_euid(sd_bus_creds *c, uid_t *euid); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_creds_get_suid(sd_bus_creds *c, uid_t *suid); int sd_bus_creds_get_fsuid(sd_bus_creds *c, uid_t *fsuid); int sd_bus_creds_get_gid(sd_bus_creds *c, gid_t *gid); #endif // 0 int sd_bus_creds_get_egid(sd_bus_creds *c, gid_t *egid); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_creds_get_sgid(sd_bus_creds *c, gid_t *sgid); int sd_bus_creds_get_fsgid(sd_bus_creds *c, gid_t *fsgid); int sd_bus_creds_get_supplementary_gids(sd_bus_creds *c, const gid_t **gids); @@ -442,8 +412,7 @@ int sd_bus_creds_get_tid_comm(sd_bus_creds *c, const char **comm); int sd_bus_creds_get_exe(sd_bus_creds *c, const char **exe); #endif // 0 int sd_bus_creds_get_cmdline(sd_bus_creds *c, char ***cmdline); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_creds_get_cgroup(sd_bus_creds *c, const char **cgroup); int sd_bus_creds_get_unit(sd_bus_creds *c, const char **unit); int sd_bus_creds_get_slice(sd_bus_creds *c, const char **slice); @@ -453,8 +422,7 @@ int sd_bus_creds_get_user_slice(sd_bus_creds *c, const char **slice); int sd_bus_creds_get_session(sd_bus_creds *c, const char **session); int sd_bus_creds_get_owner_uid(sd_bus_creds *c, uid_t *uid); int sd_bus_creds_has_effective_cap(sd_bus_creds *c, int capability); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_creds_has_permitted_cap(sd_bus_creds *c, int capability); int sd_bus_creds_has_inheritable_cap(sd_bus_creds *c, int capability); int sd_bus_creds_has_bounding_cap(sd_bus_creds *c, int capability); @@ -463,8 +431,7 @@ int sd_bus_creds_get_selinux_context(sd_bus_creds *c, const char **context); int sd_bus_creds_get_audit_session_id(sd_bus_creds *c, uint32_t *sessionid); int sd_bus_creds_get_audit_login_uid(sd_bus_creds *c, uid_t *loginuid); int sd_bus_creds_get_tty(sd_bus_creds *c, const char **tty); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_creds_get_unique_name(sd_bus_creds *c, const char **name); int sd_bus_creds_get_well_known_names(sd_bus_creds *c, char ***names); int sd_bus_creds_get_description(sd_bus_creds *c, const char **name); @@ -516,8 +483,7 @@ int sd_bus_error_add_map(const sd_bus_error_map *map); /* Label escaping */ -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_bus_path_encode(const char *prefix, const char *external_id, char **ret_path); int sd_bus_path_encode_many(char **out, const char *path_template, ...); int sd_bus_path_decode(const char *path, const char *prefix, char **ret_external_id); @@ -531,8 +497,7 @@ sd_bus_track* sd_bus_track_ref(sd_bus_track *track); sd_bus_track* sd_bus_track_unref(sd_bus_track *track); sd_bus* sd_bus_track_get_bus(sd_bus_track *track); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind void *sd_bus_track_get_userdata(sd_bus_track *track); void *sd_bus_track_set_userdata(sd_bus_track *track, void *userdata); #endif // 0 diff --git a/src/systemd/sd-daemon.h b/src/systemd/sd-daemon.h index 3390deeca..90d0ca31a 100644 --- a/src/systemd/sd-daemon.h +++ b/src/systemd/sd-daemon.h @@ -59,8 +59,7 @@ _SD_BEGIN_DECLARATIONS; /* The first passed file descriptor is fd 3 */ #define SD_LISTEN_FDS_START 3 -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind /* Returns how many file descriptors have been passed, or a negative errno code on failure. Optionally, removes the $LISTEN_FDS and @@ -121,8 +120,7 @@ int sd_is_special(int fd, const char *path); */ int sd_is_socket(int fd, int family, int type, int listening); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind /* Helper call for identifying a passed file descriptor. Returns 1 if the file descriptor is an Internet socket, of the specified family @@ -222,8 +220,7 @@ int sd_is_mq(int fd, const char *path); */ int sd_notify(int unset_environment, const char *state); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind /* Similar to sd_notify() but takes a format string. @@ -266,8 +263,7 @@ int sd_pid_notifyf(pid_t pid, int unset_environment, const char *format, ...) _s */ int sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char *state, const int *fds, unsigned n_fds); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind /* Returns > 0 if the system was booted with systemd. Returns < 0 on error. Returns 0 if the system was not booted with systemd. Note diff --git a/src/systemd/sd-event.h b/src/systemd/sd-event.h index e8a4154d3..79269bcb3 100644 --- a/src/systemd/sd-event.h +++ b/src/systemd/sd-event.h @@ -81,8 +81,7 @@ sd_event* sd_event_unref(sd_event *e); int sd_event_add_io(sd_event *e, sd_event_source **s, int fd, uint32_t events, sd_event_io_handler_t callback, void *userdata); int sd_event_add_time(sd_event *e, sd_event_source **s, clockid_t clock, uint64_t usec, uint64_t accuracy, sd_event_time_handler_t callback, void *userdata); int sd_event_add_signal(sd_event *e, sd_event_source **s, int sig, sd_event_signal_handler_t callback, void *userdata); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_event_add_child(sd_event *e, sd_event_source **s, pid_t pid, int options, sd_event_child_handler_t callback, void *userdata); int sd_event_add_defer(sd_event *e, sd_event_source **s, sd_event_handler_t callback, void *userdata); #endif // 0 @@ -93,27 +92,23 @@ int sd_event_prepare(sd_event *e); int sd_event_wait(sd_event *e, uint64_t timeout); int sd_event_dispatch(sd_event *e); int sd_event_run(sd_event *e, uint64_t timeout); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_event_loop(sd_event *e); #endif // 0 int sd_event_exit(sd_event *e, int code); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_event_now(sd_event *e, clockid_t clock, uint64_t *usec); int sd_event_get_fd(sd_event *e); #endif // 0 int sd_event_get_state(sd_event *e); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_event_get_tid(sd_event *e, pid_t *tid); int sd_event_get_exit_code(sd_event *e, int *code); #endif // 0 int sd_event_set_watchdog(sd_event *e, int b); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_event_get_watchdog(sd_event *e); sd_event_source* sd_event_source_ref(sd_event_source *s); @@ -121,47 +116,39 @@ sd_event_source* sd_event_source_ref(sd_event_source *s); sd_event_source* sd_event_source_unref(sd_event_source *s); sd_event *sd_event_source_get_event(sd_event_source *s); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind void* sd_event_source_get_userdata(sd_event_source *s); void* sd_event_source_set_userdata(sd_event_source *s, void *userdata); #endif // 0 int sd_event_source_set_description(sd_event_source *s, const char *description); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_event_source_get_description(sd_event_source *s, const char **description); #endif // 0 int sd_event_source_set_prepare(sd_event_source *s, sd_event_handler_t callback); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_event_source_get_pending(sd_event_source *s); int sd_event_source_get_priority(sd_event_source *s, int64_t *priority); #endif // 0 int sd_event_source_set_priority(sd_event_source *s, int64_t priority); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_event_source_get_enabled(sd_event_source *s, int *enabled); #endif // 0 int sd_event_source_set_enabled(sd_event_source *s, int enabled); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_event_source_get_io_fd(sd_event_source *s); #endif // 0 int sd_event_source_set_io_fd(sd_event_source *s, int fd); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_event_source_get_io_events(sd_event_source *s, uint32_t* events); #endif // 0 int sd_event_source_set_io_events(sd_event_source *s, uint32_t events); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_event_source_get_io_revents(sd_event_source *s, uint32_t* revents); #endif // 0 int sd_event_source_get_time(sd_event_source *s, uint64_t *usec); int sd_event_source_set_time(sd_event_source *s, uint64_t usec); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int sd_event_source_get_time_accuracy(sd_event_source *s, uint64_t *usec); int sd_event_source_set_time_accuracy(sd_event_source *s, uint64_t usec); int sd_event_source_get_time_clock(sd_event_source *s, clockid_t *clock);