From: Sven Eden Date: Tue, 11 Apr 2017 15:28:18 +0000 (+0200) Subject: Prep v228: Condense elogind source masks (4/5) X-Git-Tag: v228.1~1^2~7 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=6053df4ee3a205f25b67f43ece1ff4d1202b7edb Prep v228: Condense elogind source masks (4/5) --- diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c index f30adabbf..c0939b617 100644 --- a/src/core/mount-setup.c +++ b/src/core/mount-setup.c @@ -73,8 +73,7 @@ typedef struct MountPoint { #endif static const MountPoint mount_table[] = { -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind { "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, NULL, MNT_FATAL|MNT_IN_CONTAINER }, { "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, @@ -104,8 +103,7 @@ static const MountPoint mount_table[] = { #endif // 0 { "tmpfs", "/sys/fs/cgroup", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME, cg_is_legacy_wanted, MNT_FATAL|MNT_IN_CONTAINER }, -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind { "cgroup", "/sys/fs/cgroup/systemd", "cgroup", "none,name=systemd,xattr", MS_NOSUID|MS_NOEXEC|MS_NODEV, cg_is_legacy_wanted, MNT_IN_CONTAINER }, { "cgroup", "/sys/fs/cgroup/systemd", "cgroup", "none,name=systemd", MS_NOSUID|MS_NOEXEC|MS_NODEV, @@ -116,8 +114,7 @@ static const MountPoint mount_table[] = { { "cgroup", "/sys/fs/cgroup/elogind", "cgroup", "none,name=elogind", MS_NOSUID|MS_NOEXEC|MS_NODEV, cg_is_legacy_wanted, MNT_FATAL|MNT_IN_CONTAINER }, #endif // 0 -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind { "pstore", "/sys/fs/pstore", "pstore", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, NULL, MNT_NONE }, #ifdef ENABLE_EFI @@ -129,8 +126,7 @@ static const MountPoint mount_table[] = { #endif // 0 }; -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind /* These are API file systems that might be mounted by other software, * we just list them here so that we know that we should ignore them */ @@ -217,8 +213,7 @@ static int mount_one(const MountPoint *p, bool relabel) { return 1; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int mount_setup_early(void) { unsigned i; int r = 0; diff --git a/src/core/mount-setup.h b/src/core/mount-setup.h index 22b5a7823..e7246b2bc 100644 --- a/src/core/mount-setup.h +++ b/src/core/mount-setup.h @@ -23,14 +23,12 @@ #include -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int mount_setup_early(void); #endif // 0 int mount_setup(bool loaded_policy); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int mount_cgroup_controllers(char ***join_controllers); bool mount_point_is_api(const char *path); diff --git a/src/libelogind/sd-bus/bus-control.c b/src/libelogind/sd-bus/bus-control.c index c29bf30e0..c315b1383 100644 --- a/src/libelogind/sd-bus/bus-control.c +++ b/src/libelogind/sd-bus/bus-control.c @@ -1542,8 +1542,7 @@ int bus_remove_match_internal( return bus_remove_match_internal_dbus1(bus, match); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_get_name_machine_id(sd_bus *bus, const char *name, sd_id128_t *machine) { _cleanup_bus_message_unref_ sd_bus_message *reply = NULL, *m = NULL; const char *mid; diff --git a/src/libelogind/sd-bus/bus-convenience.c b/src/libelogind/sd-bus/bus-convenience.c index 829e37e4a..3c06316fb 100644 --- a/src/libelogind/sd-bus/bus-convenience.c +++ b/src/libelogind/sd-bus/bus-convenience.c @@ -59,8 +59,7 @@ _public_ int sd_bus_emit_signal( return sd_bus_send(bus, m, NULL); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_call_method_async( sd_bus *bus, sd_bus_slot **slot, @@ -258,8 +257,7 @@ _public_ int sd_bus_reply_method_errno( return sd_bus_reply_method_error(call, &berror); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_reply_method_errnof( sd_bus_message *call, int error, @@ -331,8 +329,7 @@ fail: return sd_bus_error_set_errno(error, r); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_get_property_trivial( sd_bus *bus, const char *destination, @@ -426,8 +423,7 @@ fail: return sd_bus_error_set_errno(error, r); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_get_property_strv( sd_bus *bus, const char *destination, diff --git a/src/libelogind/sd-bus/bus-creds.c b/src/libelogind/sd-bus/bus-creds.c index 90e375698..4c109cdbd 100644 --- a/src/libelogind/sd-bus/bus-creds.c +++ b/src/libelogind/sd-bus/bus-creds.c @@ -132,8 +132,7 @@ _public_ sd_bus_creds *sd_bus_creds_unref(sd_bus_creds *c) { return NULL; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ uint64_t sd_bus_creds_get_mask(const sd_bus_creds *c) { assert_return(c, 0); @@ -159,8 +158,7 @@ sd_bus_creds* bus_creds_new(void) { return c; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_creds_new_from_pid(sd_bus_creds **ret, pid_t pid, uint64_t mask) { sd_bus_creds *c; int r; @@ -216,8 +214,7 @@ _public_ int sd_bus_creds_get_euid(sd_bus_creds *c, uid_t *euid) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_creds_get_suid(sd_bus_creds *c, uid_t *suid) { assert_return(c, -EINVAL); assert_return(suid, -EINVAL); @@ -264,8 +261,7 @@ _public_ int sd_bus_creds_get_egid(sd_bus_creds *c, gid_t *egid) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_creds_get_sgid(sd_bus_creds *c, gid_t *sgid) { assert_return(c, -EINVAL); assert_return(sgid, -EINVAL); @@ -312,8 +308,7 @@ _public_ int sd_bus_creds_get_pid(sd_bus_creds *c, pid_t *pid) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_creds_get_ppid(sd_bus_creds *c, pid_t *ppid) { assert_return(c, -EINVAL); assert_return(ppid, -EINVAL); @@ -355,8 +350,7 @@ _public_ int sd_bus_creds_get_selinux_context(sd_bus_creds *c, const char **ret) return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_creds_get_comm(sd_bus_creds *c, const char **ret) { assert_return(c, -EINVAL); assert_return(ret, -EINVAL); @@ -632,8 +626,7 @@ _public_ int sd_bus_creds_get_tty(sd_bus_creds *c, const char **ret) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_creds_get_unique_name(sd_bus_creds *c, const char **unique_name) { assert_return(c, -EINVAL); assert_return(unique_name, -EINVAL); @@ -723,8 +716,7 @@ _public_ int sd_bus_creds_has_effective_cap(sd_bus_creds *c, int capability) { return has_cap(c, CAP_OFFSET_EFFECTIVE, capability); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_creds_has_permitted_cap(sd_bus_creds *c, int capability) { assert_return(c, -EINVAL); assert_return(capability >= 0, -EINVAL); diff --git a/src/libelogind/sd-bus/bus-internal.c b/src/libelogind/sd-bus/bus-internal.c index 40939f9f8..d50e4e350 100644 --- a/src/libelogind/sd-bus/bus-internal.c +++ b/src/libelogind/sd-bus/bus-internal.c @@ -170,8 +170,7 @@ bool service_name_is_valid(const char *p) { return true; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind char* service_name_startswith(const char *a, const char *b) { const char *p; diff --git a/src/libelogind/sd-bus/bus-internal.h b/src/libelogind/sd-bus/bus-internal.h index 0a4d9b5c8..407dcf48f 100644 --- a/src/libelogind/sd-bus/bus-internal.h +++ b/src/libelogind/sd-bus/bus-internal.h @@ -344,8 +344,7 @@ struct sd_bus { bool interface_name_is_valid(const char *p) _pure_; bool service_name_is_valid(const char *p) _pure_; -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind char* service_name_startswith(const char *a, const char *b); #endif // 0 bool member_name_is_valid(const char *p) _pure_; @@ -387,15 +386,13 @@ char *bus_address_escape(const char *v); _cleanup_bus_unref_ _unused_ sd_bus *_dont_destroy_##bus = sd_bus_ref(bus) int bus_set_address_system(sd_bus *bus); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_set_address_user(sd_bus *bus); #endif // 0 int bus_set_address_system_remote(sd_bus *b, const char *host); int bus_set_address_system_machine(sd_bus *b, const char *machine); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_remove_match_by_string(sd_bus *bus, const char *match, sd_bus_message_handler_t callback, void *userdata); #endif // 0 diff --git a/src/libelogind/sd-bus/bus-kernel.c b/src/libelogind/sd-bus/bus-kernel.c index ae53b7dec..d97c80230 100644 --- a/src/libelogind/sd-bus/bus-kernel.c +++ b/src/libelogind/sd-bus/bus-kernel.c @@ -1584,8 +1584,7 @@ uint64_t attach_flags_to_kdbus(uint64_t mask) { return m; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_kernel_create_bus(const char *name, bool world, char **s) { struct kdbus_cmd *make; struct kdbus_item *n; @@ -1695,8 +1694,7 @@ int bus_kernel_open_bus_fd(const char *bus, char **path) { return fd; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_kernel_create_endpoint(const char *bus_name, const char *ep_name, char **ep_path) { _cleanup_free_ char *path = NULL; struct kdbus_cmd *make; @@ -1754,8 +1752,7 @@ int bus_kernel_try_close(sd_bus *bus) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_kernel_drop_one(int fd) { struct kdbus_cmd_recv recv = { .size = sizeof(recv), diff --git a/src/libelogind/sd-bus/bus-kernel.h b/src/libelogind/sd-bus/bus-kernel.h index 43f0febfc..bdb1c0450 100644 --- a/src/libelogind/sd-bus/bus-kernel.h +++ b/src/libelogind/sd-bus/bus-kernel.h @@ -71,8 +71,7 @@ int bus_kernel_read_message(sd_bus *bus, bool hint_priority, int64_t priority); int bus_kernel_open_bus_fd(const char *bus, char **path); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_kernel_create_bus(const char *name, bool world, char **s); int bus_kernel_create_endpoint(const char *bus_name, const char *ep_name, char **path); #endif // 0 @@ -89,8 +88,7 @@ uint64_t attach_flags_to_kdbus(uint64_t sd_bus_flags); int bus_kernel_try_close(sd_bus *bus); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_kernel_drop_one(int fd); #endif // 0 diff --git a/src/libelogind/sd-bus/bus-match.c b/src/libelogind/sd-bus/bus-match.c index de80c01b8..faff9c82b 100644 --- a/src/libelogind/sd-bus/bus-match.c +++ b/src/libelogind/sd-bus/bus-match.c @@ -936,8 +936,7 @@ fail: return r; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind char *bus_match_to_string(struct bus_match_component *components, unsigned n_components) { _cleanup_fclose_ FILE *f = NULL; char *buffer = NULL; diff --git a/src/libelogind/sd-bus/bus-match.h b/src/libelogind/sd-bus/bus-match.h index d30873665..4a6312d81 100644 --- a/src/libelogind/sd-bus/bus-match.h +++ b/src/libelogind/sd-bus/bus-match.h @@ -97,8 +97,7 @@ enum bus_match_node_type bus_match_node_type_from_string(const char *k, size_t n int bus_match_parse(const char *match, struct bus_match_component **_components, unsigned *_n_components); void bus_match_parse_free(struct bus_match_component *components, unsigned n_components); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind char *bus_match_to_string(struct bus_match_component *components, unsigned n_components); #endif // 0 diff --git a/src/libelogind/sd-bus/bus-message.c b/src/libelogind/sd-bus/bus-message.c index 0575890e3..08cecfb28 100644 --- a/src/libelogind/sd-bus/bus-message.c +++ b/src/libelogind/sd-bus/bus-message.c @@ -831,8 +831,7 @@ _public_ int sd_bus_message_new_method_errno( return sd_bus_message_new_method_error(call, m, &berror); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_message_new_method_errnof( sd_bus_message *call, sd_bus_message **m, @@ -945,8 +944,7 @@ _public_ sd_bus_message* sd_bus_message_unref(sd_bus_message *m) { return NULL; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_message_get_type(sd_bus_message *m, uint8_t *type) { assert_return(m, -EINVAL); assert_return(type, -EINVAL); @@ -1040,8 +1038,7 @@ _public_ const sd_bus_error *sd_bus_message_get_error(sd_bus_message *m) { return &m->error; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_message_get_monotonic_usec(sd_bus_message *m, uint64_t *usec) { assert_return(m, -EINVAL); assert_return(usec, -EINVAL); @@ -1085,8 +1082,7 @@ _public_ sd_bus_creds *sd_bus_message_get_creds(sd_bus_message *m) { return &m->creds; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_message_is_signal( sd_bus_message *m, const char *interface, @@ -1138,8 +1134,7 @@ _public_ int sd_bus_message_is_method_error(sd_bus_message *m, const char *name) return 1; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_message_set_expect_reply(sd_bus_message *m, int b) { assert_return(m, -EINVAL); assert_return(!m->sealed, -EPERM); @@ -1671,8 +1666,7 @@ _public_ int sd_bus_message_append_basic(sd_bus_message *m, char type, const voi return message_append_basic(m, type, p, NULL); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_message_append_string_space( sd_bus_message *m, size_t size, @@ -2588,8 +2582,7 @@ _public_ int sd_bus_message_append(sd_bus_message *m, const char *types, ...) { return r; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_message_append_array_space( sd_bus_message *m, char type, @@ -3168,8 +3161,7 @@ static bool message_end_of_array(sd_bus_message *m, size_t index) { } } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_message_at_end(sd_bus_message *m, int complete) { assert_return(m, -EINVAL); assert_return(m->sealed, -EPERM); @@ -5569,8 +5561,7 @@ _public_ int sd_bus_message_set_destination(sd_bus_message *m, const char *desti return message_append_field_string(m, BUS_MESSAGE_HEADER_DESTINATION, SD_BUS_TYPE_STRING, destination, &m->destination); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_message_get_blob(sd_bus_message *m, void **buffer, size_t *sz) { size_t total; void *p, *e; @@ -5742,8 +5733,7 @@ _public_ const char* sd_bus_message_get_signature(sd_bus_message *m, int complet return strempty(c->signature); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_message_is_empty(sd_bus_message *m) { assert_return(m, -EINVAL); @@ -5836,8 +5826,7 @@ _public_ int sd_bus_message_copy(sd_bus_message *m, sd_bus_message *source, int return done_something; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_message_verify_type(sd_bus_message *m, char type, const char *contents) { const char *c; char t; @@ -5955,8 +5944,7 @@ int bus_message_remarshal(sd_bus *bus, sd_bus_message **m) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_message_append_sender(sd_bus_message *m, const char *sender) { assert(m); assert(sender); diff --git a/src/libelogind/sd-bus/bus-message.h b/src/libelogind/sd-bus/bus-message.h index 7efe3ffe8..3274f6005 100644 --- a/src/libelogind/sd-bus/bus-message.h +++ b/src/libelogind/sd-bus/bus-message.h @@ -194,8 +194,7 @@ static inline bool BUS_MESSAGE_IS_GVARIANT(sd_bus_message *m) { } int bus_message_seal(sd_bus_message *m, uint64_t serial, usec_t timeout); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_message_get_blob(sd_bus_message *m, void **buffer, size_t *sz); #endif // 0 int bus_message_read_strv_extend(sd_bus_message *m, char ***l); @@ -243,8 +242,7 @@ int bus_message_new_synthetic_error(sd_bus *bus, uint64_t serial, const sd_bus_e int bus_message_remarshal(sd_bus *bus, sd_bus_message **m); -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_message_append_sender(sd_bus_message *m, const char *sender); #endif // 0 diff --git a/src/libelogind/sd-bus/bus-objects.c b/src/libelogind/sd-bus/bus-objects.c index 4b9c05d09..fbd84571a 100644 --- a/src/libelogind/sd-bus/bus-objects.c +++ b/src/libelogind/sd-bus/bus-objects.c @@ -2365,8 +2365,7 @@ _public_ int sd_bus_emit_object_added(sd_bus *bus, const char *path) { return sd_bus_send(bus, m, NULL); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static int object_removed_append_all_prefix( sd_bus *bus, sd_bus_message *m, @@ -2775,8 +2774,7 @@ _public_ int sd_bus_emit_interfaces_removed(sd_bus *bus, const char *path, const return sd_bus_emit_interfaces_removed_strv(bus, path, interfaces); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_add_object_manager(sd_bus *bus, sd_bus_slot **slot, const char *path) { sd_bus_slot *s; struct node *n; diff --git a/src/libelogind/sd-bus/bus-slot.c b/src/libelogind/sd-bus/bus-slot.c index 6149a981d..970f17957 100644 --- a/src/libelogind/sd-bus/bus-slot.c +++ b/src/libelogind/sd-bus/bus-slot.c @@ -217,8 +217,7 @@ _public_ sd_bus_slot* sd_bus_slot_unref(sd_bus_slot *slot) { return NULL; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ sd_bus* sd_bus_slot_get_bus(sd_bus_slot *slot) { assert_return(slot, NULL); diff --git a/src/libelogind/sd-bus/bus-track.c b/src/libelogind/sd-bus/bus-track.c index f8b7cfada..5f6e0f8cc 100644 --- a/src/libelogind/sd-bus/bus-track.c +++ b/src/libelogind/sd-bus/bus-track.c @@ -320,8 +320,7 @@ void bus_track_dispatch(sd_bus_track *track) { sd_bus_track_unref(track); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ void *sd_bus_track_get_userdata(sd_bus_track *track) { assert_return(track, NULL); diff --git a/src/libelogind/sd-bus/bus-type.c b/src/libelogind/sd-bus/bus-type.c index afdf234ef..235bc81c0 100644 --- a/src/libelogind/sd-bus/bus-type.c +++ b/src/libelogind/sd-bus/bus-type.c @@ -45,8 +45,7 @@ bool bus_type_is_valid(char c) { return !!memchr(valid, c, sizeof(valid)); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind bool bus_type_is_valid_in_signature(char c) { static const char valid[] = { SD_BUS_TYPE_BYTE, diff --git a/src/libelogind/sd-bus/sd-bus.c b/src/libelogind/sd-bus/sd-bus.c index 630c84935..4870bc70a 100644 --- a/src/libelogind/sd-bus/sd-bus.c +++ b/src/libelogind/sd-bus/sd-bus.c @@ -75,8 +75,7 @@ static int attach_io_events(sd_bus *b); static void detach_io_events(sd_bus *b); static thread_local sd_bus *default_system_bus = NULL; -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static thread_local sd_bus *default_user_bus = NULL; #endif // 0 static thread_local sd_bus *default_starter_bus = NULL; @@ -236,8 +235,7 @@ _public_ int sd_bus_set_fd(sd_bus *bus, int input_fd, int output_fd) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]) { char *p, **a; @@ -386,8 +384,7 @@ _public_ int sd_bus_set_allow_interactive_authorization(sd_bus *bus, int b) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_get_allow_interactive_authorization(sd_bus *bus) { assert_return(bus, -EINVAL); assert_return(!bus_pid_changed(bus), -ECHILD); @@ -1524,8 +1521,7 @@ _public_ sd_bus *sd_bus_unref(sd_bus *bus) { return NULL; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_is_open(sd_bus *bus) { assert_return(bus, -EINVAL); @@ -1559,8 +1555,7 @@ _public_ int sd_bus_can_send(sd_bus *bus, char type) { return bus_type_is_valid(type); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_get_bus_id(sd_bus *bus, sd_id128_t *id) { int r; @@ -1852,8 +1847,7 @@ _public_ int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *cookie) { return bus_send_internal(bus, m, cookie, false); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_send_to(sd_bus *bus, sd_bus_message *m, const char *destination, uint64_t *cookie) { int r; @@ -2164,8 +2158,7 @@ fail: return sd_bus_error_set_errno(error, r); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_get_fd(sd_bus *bus) { assert_return(bus, -EINVAL); @@ -2850,8 +2843,7 @@ _public_ int sd_bus_process(sd_bus *bus, sd_bus_message **ret) { return bus_process_internal(bus, false, 0, ret); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_process_priority(sd_bus *bus, int64_t priority, sd_bus_message **ret) { return bus_process_internal(bus, true, priority, ret); } @@ -2972,8 +2964,7 @@ _public_ int sd_bus_flush(sd_bus *bus) { } } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_add_filter( sd_bus *bus, sd_bus_slot **slot, @@ -3077,8 +3068,7 @@ finish: return r; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int bus_remove_match_by_string( sd_bus *bus, const char *match, @@ -3355,8 +3345,7 @@ _public_ sd_bus_message* sd_bus_get_current_message(sd_bus *bus) { return bus->current_message; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ sd_bus_slot* sd_bus_get_current_slot(sd_bus *bus) { assert_return(bus, NULL); @@ -3459,8 +3448,7 @@ _public_ int sd_bus_default(sd_bus **ret) { return sd_bus_default_system(ret); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_get_tid(sd_bus *b, pid_t *tid) { assert_return(b, -EINVAL); assert_return(tid, -EINVAL); @@ -3739,8 +3727,7 @@ int bus_get_root_path(sd_bus *bus) { return r; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_bus_get_scope(sd_bus *bus, const char **scope) { int r; diff --git a/src/libelogind/sd-daemon/sd-daemon.c b/src/libelogind/sd-daemon/sd-daemon.c index b5454f1ef..a25353bb5 100644 --- a/src/libelogind/sd-daemon/sd-daemon.c +++ b/src/libelogind/sd-daemon/sd-daemon.c @@ -46,8 +46,7 @@ #define SNDBUF_SIZE (8*1024*1024) -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static void unsetenv_all(bool unset_environment) { if (!unset_environment) @@ -284,8 +283,7 @@ _public_ int sd_is_socket(int fd, int family, int type, int listening) { return 1; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port) { union sockaddr_union sockaddr = {}; socklen_t l = sizeof(sockaddr); @@ -533,8 +531,7 @@ finish: return r; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_pid_notify(pid_t pid, int unset_environment, const char *state) { return sd_pid_notify_with_fds(pid, unset_environment, state, NULL, 0); } @@ -544,8 +541,7 @@ _public_ int sd_notify(int unset_environment, const char *state) { return sd_pid_notify_with_fds(0, unset_environment, state, NULL, 0); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_pid_notifyf(pid_t pid, int unset_environment, const char *format, ...) { _cleanup_free_ char *p = NULL; int r; diff --git a/src/libelogind/sd-event/sd-event.c b/src/libelogind/sd-event/sd-event.c index d26efb828..5380d2178 100644 --- a/src/libelogind/sd-event/sd-event.c +++ b/src/libelogind/sd-event/sd-event.c @@ -517,8 +517,7 @@ static int source_io_register( return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static clockid_t event_source_type_to_clock(EventSourceType t) { switch (t) { @@ -1169,8 +1168,7 @@ _public_ int sd_event_add_signal( return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_event_add_child( sd_event *e, sd_event_source **ret, @@ -1344,8 +1342,7 @@ _public_ int sd_event_add_exit( return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ sd_event_source* sd_event_source_ref(sd_event_source *s) { assert_return(s, NULL); @@ -1392,8 +1389,7 @@ _public_ int sd_event_source_set_description(sd_event_source *s, const char *des return free_and_strdup(&s->description, description); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_event_source_get_description(sd_event_source *s, const char **description) { assert_return(s, -EINVAL); assert_return(description, -EINVAL); @@ -1411,8 +1407,7 @@ _public_ sd_event *sd_event_source_get_event(sd_event_source *s) { return s->event; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_event_source_get_pending(sd_event_source *s) { assert_return(s, -EINVAL); assert_return(s->type != SOURCE_EXIT, -EDOM); @@ -1467,8 +1462,7 @@ _public_ int sd_event_source_set_io_fd(sd_event_source *s, int fd) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_event_source_get_io_events(sd_event_source *s, uint32_t* events) { assert_return(s, -EINVAL); assert_return(events, -EINVAL); @@ -1505,8 +1499,7 @@ _public_ int sd_event_source_set_io_events(sd_event_source *s, uint32_t events) return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_event_source_get_io_revents(sd_event_source *s, uint32_t* revents) { assert_return(s, -EINVAL); assert_return(revents, -EINVAL); @@ -1576,8 +1569,7 @@ _public_ int sd_event_source_set_priority(sd_event_source *s, int64_t priority) return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_event_source_get_enabled(sd_event_source *s, int *m) { assert_return(s, -EINVAL); assert_return(m, -EINVAL); @@ -1773,8 +1765,7 @@ _public_ int sd_event_source_set_time(sd_event_source *s, uint64_t usec) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_event_source_get_time_accuracy(sd_event_source *s, uint64_t *usec) { assert_return(s, -EINVAL); assert_return(usec, -EINVAL); @@ -1863,8 +1854,7 @@ _public_ int sd_event_source_set_prepare(sd_event_source *s, sd_event_handler_t return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ void* sd_event_source_get_userdata(sd_event_source *s) { assert_return(s, NULL); @@ -2666,8 +2656,7 @@ _public_ int sd_event_run(sd_event *e, uint64_t timeout) { return r; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_event_loop(sd_event *e) { int r; @@ -2706,8 +2695,7 @@ _public_ int sd_event_get_state(sd_event *e) { return e->state; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_event_get_exit_code(sd_event *e, int *code) { assert_return(e, -EINVAL); assert_return(code, -EINVAL); @@ -2732,8 +2720,7 @@ _public_ int sd_event_exit(sd_event *e, int code) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_event_now(sd_event *e, clockid_t clock, uint64_t *usec) { assert_return(e, -EINVAL); assert_return(usec, -EINVAL); @@ -2793,8 +2780,7 @@ _public_ int sd_event_default(sd_event **ret) { return 1; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_event_get_tid(sd_event *e, pid_t *tid) { assert_return(e, -EINVAL); assert_return(tid, -EINVAL); @@ -2861,8 +2847,7 @@ fail: return r; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind _public_ int sd_event_get_watchdog(sd_event *e) { assert_return(e, -EINVAL); assert_return(!event_pid_changed(e), -ECHILD); diff --git a/src/login/loginctl.c b/src/login/loginctl.c index fec9fe58b..186959e9c 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -102,8 +102,7 @@ static void polkit_agent_open_if_enabled(void) { polkit_agent_open(); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static OutputFlags get_output_flags(void) { return @@ -254,8 +253,7 @@ static int list_seats(int argc, char *argv[], void *userdata) { return 0; } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static int show_unit_cgroup(sd_bus *bus, const char *interface, const char *unit, pid_t leader) { _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; _cleanup_bus_message_unref_ sd_bus_message *reply = NULL; diff --git a/src/login/logind-core.c b/src/login/logind-core.c index 4ab66cd9b..c7d7cedf7 100644 --- a/src/login/logind-core.c +++ b/src/login/logind-core.c @@ -410,8 +410,7 @@ bool manager_shall_kill(Manager *m, const char *user) { return strv_contains(m->kill_only_users, user); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static int vt_is_busy(unsigned int vtnr) { struct vt_stat vt_stat; int r = 0; diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 5383538d1..8f563268f 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -2633,8 +2633,7 @@ const sd_bus_vtable manager_vtable[] = { SD_BUS_VTABLE_END }; -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind static int session_jobs_reply(Session *s, const char *unit, const char *result) { int r = 0; @@ -2819,8 +2818,7 @@ int manager_send_changed(Manager *manager, const char *property, ...) { l); } -/// UNNEEDED by elogind -#if 0 +#if 0 /// UNNEEDED by elogind int manager_start_slice( Manager *manager, const char *slice,