chiark / gitweb /
Prep v231: Apply missing fixes from upstream (5/6) src/shared
authorSven Eden <yamakuzure@gmx.net>
Wed, 14 Jun 2017 15:44:53 +0000 (17:44 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:13:01 +0000 (10:13 +0200)
src/shared/bus-util.c
src/shared/bus-util.h

index ebfe2255f441b83182e27757e6020baa70e78ddb..5ea4e56087d3fd01b6310652a80dff2379db21d8 100644 (file)
@@ -1519,40 +1519,6 @@ int bus_path_decode_unique(const char *path, const char *prefix, char **ret_send
 }
 #endif // 0
 
-bool is_kdbus_wanted(void) {
-        _cleanup_free_ char *value = NULL;
-#ifdef ENABLE_KDBUS
-        const bool configured = true;
-#else
-        const bool configured = false;
-#endif
-
-        int r;
-
-        if (get_proc_cmdline_key("kdbus", NULL) > 0)
-                return true;
-
-        r = get_proc_cmdline_key("kdbus=", &value);
-        if (r <= 0)
-                return configured;
-
-        return parse_boolean(value) == 1;
-}
-
-bool is_kdbus_available(void) {
-        _cleanup_close_ int fd = -1;
-        struct kdbus_cmd cmd = { .size = sizeof(cmd), .flags = KDBUS_FLAG_NEGOTIATE };
-
-        if (!is_kdbus_wanted())
-                return false;
-
-        fd = open("/sys/fs/kdbus/control", O_RDWR | O_CLOEXEC | O_NONBLOCK | O_NOCTTY);
-        if (fd < 0)
-                return false;
-
-        return ioctl(fd, KDBUS_CMD_BUS_MAKE, &cmd) >= 0;
-}
-
 #if 0 /// UNNEEDED by elogind
 int bus_property_get_rlimit(
                 sd_bus *bus,
index df446edc1e93b2018211f29f8aaa4afb2367f16e..88c2804d66c81eb33b792c8d40f592beaedba406 100644 (file)
@@ -173,9 +173,6 @@ int bus_path_encode_unique(sd_bus *b, const char *prefix, const char *sender_id,
 int bus_path_decode_unique(const char *path, const char *prefix, char **ret_sender, char **ret_external);
 #endif // 0
 
-bool is_kdbus_wanted(void);
-bool is_kdbus_available(void);
-
 #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