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} \
} \
}
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;
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,
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) {
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;
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) {
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) &&
[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
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
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
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);
/* 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);
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);
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);
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
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;
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
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
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;
#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;
_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);
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
/* 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
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
[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,
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);
}
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;
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;
}
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
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;
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;
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;
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);
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;
}
}
-/// 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;
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;
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);
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;
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;
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;
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
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
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
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
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
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
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,
return 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
static int session_start_scope(Session *s) {
int r;
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;
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);
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;
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;
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)
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;
/* always NULL */
char *scope;
-/// UNNEEDED (and unsupported) by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
char *scope_job;
#endif // 0
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
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);
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
}
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;
}
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;
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;
}
/* 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;
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;
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)
}
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);
char *slice;
char *service;
-/// UNNEEDED (and unsupported) by elogind
-#if 0
+
+#if 0 /// UNNEEDED by elogind
char *service_job;
char *slice_job;
#endif // 0
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;
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
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;
return 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
static int manager_reserve_vt(Manager *m) {
_cleanup_free_ char *p = NULL;
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',"
}
/* 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");
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
}
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);
* 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);
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;
* 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 */
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
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);
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);
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
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;
#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);
#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;
#endif
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int bus_check_peercred(sd_bus *c) {
struct ucred ucred;
socklen_t l;
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,
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
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;
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");
}
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);
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,
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
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
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;
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;
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
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;
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;
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);
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,
return 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int config_parse_tristate(
const char* unit,
const char *filename,
return 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int config_parse_log_facility(
const char *unit,
const char *filename,
return 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int config_parse_personality(
const char *unit,
const char *filename,
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
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
typedef enum OutputMode {
OUTPUT_SHORT,
OUTPUT_SHORT_ISO,
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;
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
_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);
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);
#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)
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);
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
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);
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);
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);
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
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);
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);
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);
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);
#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);
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
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
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
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);
/* 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);
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);
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);
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);
/* 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);
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
/* 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
*/
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
*/
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.
*/
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
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
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);
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);