diff options
Diffstat (limited to 'src/libsystemd/sd-bus/bus-internal.h')
-rw-r--r-- | src/libsystemd/sd-bus/bus-internal.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/libsystemd/sd-bus/bus-internal.h b/src/libsystemd/sd-bus/bus-internal.h index 2087ef8eeb..f208b294d8 100644 --- a/src/libsystemd/sd-bus/bus-internal.h +++ b/src/libsystemd/sd-bus/bus-internal.h @@ -1,9 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once -/*** -***/ - #include <pthread.h> #include <sys/socket.h> @@ -214,6 +211,7 @@ struct sd_bus { bool accept_fd:1; bool attach_timestamp:1; bool connected_signal:1; + bool close_on_exit:1; int use_memfd; @@ -307,8 +305,6 @@ struct sd_bus { sd_bus **default_bus_ptr; pid_t tid; - char *cgroup_root; - char *description; char *patch_sender; @@ -319,9 +315,12 @@ struct sd_bus { int *inotify_watches; size_t n_inotify_watches; + + /* zero means use value specified by $SYSTEMD_BUS_TIMEOUT= environment variable or built-in default */ + usec_t method_call_timeout; }; -/* For method calls we time-out at 25s, like in the D-Bus reference implementation */ +/* For method calls we timeout at 25s, like in the D-Bus reference implementation */ #define BUS_DEFAULT_TIMEOUT ((usec_t) (25 * USEC_PER_SEC)) /* For the authentication phase we grant 90s, to provide extra room during boot, when RNGs and such are not filled up @@ -336,8 +335,7 @@ struct sd_bus { #define BUS_CONTAINER_DEPTH 128 -/* Defined by the specification as maximum size of an array in - * bytes */ +/* Defined by the specification as maximum size of an array in bytes */ #define BUS_ARRAY_MAX_SIZE 67108864 #define BUS_FDS_MAX 1024 @@ -346,7 +344,6 @@ struct sd_bus { bool interface_name_is_valid(const char *p) _pure_; bool service_name_is_valid(const char *p) _pure_; -char* service_name_startswith(const char *a, const char *b); bool member_name_is_valid(const char *p) _pure_; bool object_path_is_valid(const char *p) _pure_; char *object_path_startswith(const char *a, const char *b) _pure_; @@ -384,12 +381,11 @@ void bus_close_io_fds(sd_bus *b); #define OBJECT_PATH_FOREACH_PREFIX(prefix, path) \ for (char *_slash = ({ strcpy((prefix), (path)); streq((prefix), "/") ? NULL : strrchr((prefix), '/'); }) ; \ - _slash && !(_slash[(_slash) == (prefix)] = 0); \ + _slash && ((_slash[(_slash) == (prefix)] = 0), true); \ _slash = streq((prefix), "/") ? NULL : strrchr((prefix), '/')) /* If we are invoking callbacks of a bus object, ensure unreffing the - * bus from the callback doesn't destroy the object we are working - * on */ + * bus from the callback doesn't destroy the object we are working on */ #define BUS_DONT_DESTROY(bus) \ _cleanup_(sd_bus_unrefp) _unused_ sd_bus *_dont_destroy_##bus = sd_bus_ref(bus) @@ -398,8 +394,6 @@ int bus_set_address_user(sd_bus *bus); int bus_set_address_system_remote(sd_bus *b, const char *host); int bus_set_address_system_machine(sd_bus *b, const char *machine); -int bus_get_root_path(sd_bus *bus); - int bus_maybe_reply_error(sd_bus_message *m, int r, sd_bus_error *error); #define bus_assert_return(expr, r, error) \ |