chiark / gitweb /
Prep v228: Condense elogind source masks (4/5)
authorSven Eden <yamakuzure@gmx.net>
Tue, 11 Apr 2017 15:28:18 +0000 (17:28 +0200)
committerSven Eden <yamakuzure@gmx.net>
Wed, 26 Apr 2017 10:59:13 +0000 (12:59 +0200)
23 files changed:
src/core/mount-setup.c
src/core/mount-setup.h
src/libelogind/sd-bus/bus-control.c
src/libelogind/sd-bus/bus-convenience.c
src/libelogind/sd-bus/bus-creds.c
src/libelogind/sd-bus/bus-internal.c
src/libelogind/sd-bus/bus-internal.h
src/libelogind/sd-bus/bus-kernel.c
src/libelogind/sd-bus/bus-kernel.h
src/libelogind/sd-bus/bus-match.c
src/libelogind/sd-bus/bus-match.h
src/libelogind/sd-bus/bus-message.c
src/libelogind/sd-bus/bus-message.h
src/libelogind/sd-bus/bus-objects.c
src/libelogind/sd-bus/bus-slot.c
src/libelogind/sd-bus/bus-track.c
src/libelogind/sd-bus/bus-type.c
src/libelogind/sd-bus/sd-bus.c
src/libelogind/sd-daemon/sd-daemon.c
src/libelogind/sd-event/sd-event.c
src/login/loginctl.c
src/login/logind-core.c
src/login/logind-dbus.c

index f30adabbf07137ddb49d4f1f4a1fa4b8e25fcd1e..c0939b617dc80d0d75d80c210a99974ca9ad1b4d 100644 (file)
@@ -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;
index 22b5a7823f9260cfc2109f814c63d58abb05d1d0..e7246b2bc997f4cb0b6cd5b2a020067ebd248df7 100644 (file)
 
 #include <stdbool.h>
 
-/// 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);
index c29bf30e0b99dc1d082553a31eb5518093472787..c315b1383c12ec5cf5bb382aa49ffce0406b2a15 100644 (file)
@@ -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;
index 829e37e4a1ff8e02e18a0c8b433b80d16594387c..3c06316fbac8e5144c3111798e43b1e5d6e37536 100644 (file)
@@ -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,
index 90e37569886adb837a344c18973099931204845b..4c109cdbd8b9d2661ff32fad7d4ae867be7b1b70 100644 (file)
@@ -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);
index 40939f9f8d9cf3a8498639a3acb71098308ab9d9..d50e4e350de413367f371234c680582c2d74c3a9 100644 (file)
@@ -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;
 
index 0a4d9b5c841d22e2d0382d840559130bcea0d358..407dcf48fa235e9be745d553030463d598fb5fc2 100644 (file)
@@ -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
 
index ae53b7dec8cf3072c6267a3b9153f5a7e80fe426..d97c802307a47c3ceeab9c0315e958496b7ce020 100644 (file)
@@ -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),
index 43f0febfcd66500a9c803c10c6d09ab2875c7e83..bdb1c04501c59f0a56c7c7b05fee886b309b6efd 100644 (file)
@@ -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
 
index de80c01b8099fc2b3dc0ade1733450b0a1f77278..faff9c82b19c919fc43a60eb707bfcea35ee9f5c 100644 (file)
@@ -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;
index d308736652dc27c83b39be87ab6e92b8cc3d7cfb..4a6312d81f0514c83a3cbb7e74a5d83f757e602c 100644 (file)
@@ -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
 
index 0575890e339e2f64f0eebcd11ee5a04898a71a28..08cecfb2853b509501ff9ddfd10d87eb9224aa4d 100644 (file)
@@ -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);
index 7efe3ffe8e0669f3692cc0a7105e69e73bae38b7..3274f6005287c8bf5fe379d286d83a7ca826d90d 100644 (file)
@@ -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
 
index 4b9c05d09ce15c9b53b57c7fb296274d0bb1efca..fbd84571ab21d3771c43f20ffcabbb6f5e6fa596 100644 (file)
@@ -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;
index 6149a981d74d5bc46a35335285e5fe305fde333e..970f179579af79e9edc9ece969645541e7487ce1 100644 (file)
@@ -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);
 
index f8b7cfada004fbc1b6ff5ee1e59fa03cf4a5f6a3..5f6e0f8cc36fc70f4848924ca6c7019ee9be1ecb 100644 (file)
@@ -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);
 
index afdf234efe8c35061f1e2758a8d618445b6fbe5b..235bc81c06d037686d354fcbbfad072165b9be49 100644 (file)
@@ -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,
index 630c84935f0f87f37270e0e07e00ea9b123e42b5..4870bc70a356ac9d79fca5e0e999fbd0c733f2b3 100644 (file)
@@ -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;
 
index b5454f1ef557e58be010f11effccf9b1ece5cb0d..a25353bb51adc1c87f678abc6bc3728809d08ed4 100644 (file)
@@ -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;
index d26efb8289fde67e2370a3f7a30c9cb40d144d51..5380d2178b126027965aa5c5f9233dc3d0f870fd 100644 (file)
@@ -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);
index fec9fe58b047f5567d04ad66f8f46283da135b8b..186959e9c2322c17e5b2e87f35a55fc2f8375bde 100644 (file)
@@ -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;
index 4ab66cd9bf0c3199791983fdfa01d6991cbe0fe9..c7d7cedf79ffc918620659a3bd15485adf8c5f28 100644 (file)
@@ -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;
index 5383538d118c3df88769aa97c4d72565db0caecb..8f563268f6a09ad0ae44c40cc8f1d7492f79e6b8 100644 (file)
@@ -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,