diff options
author | Sven Eden <yamakuzure@gmx.net> | 2017-06-14 17:44:53 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-06-16 10:13:01 +0200 |
commit | d0da92ba28e1abe4e6314ef3f0876871aa238f33 (patch) | |
tree | 5a489fecd60bbce8cc9dfd9943ba0548ec157e58 /src/shared | |
parent | c651a8a1445336b303e7ffdbcc9c8a4ef5389a4e (diff) |
Prep v231: Apply missing fixes from upstream (5/6) src/shared
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/bus-util.c | 34 | ||||
-rw-r--r-- | src/shared/bus-util.h | 3 |
2 files changed, 0 insertions, 37 deletions
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index ebfe2255f..5ea4e5608 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -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, diff --git a/src/shared/bus-util.h b/src/shared/bus-util.h index df446edc1..88c2804d6 100644 --- a/src/shared/bus-util.h +++ b/src/shared/bus-util.h @@ -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 |