chiark / gitweb /
sd-bus: rename default bus address constants, they aren't "paths" but "addresses"
[elogind.git] / src / shared / def.h
index 825db9507f7ff35bbc35d6f34b2bd5ddca88888c..96c45a6b723dededf0c59e0b08778d124fd04779 100644 (file)
 #define DEFAULT_START_LIMIT_INTERVAL (10*USEC_PER_SEC)
 #define DEFAULT_START_LIMIT_BURST 5
 
-#define DEFAULT_EXIT_USEC (5*USEC_PER_MINUTE)
+/* The default time after which exit-on-idle services exit. This
+ * should be kept lower than the watchdog timeout, because otherwise
+ * the watchdog pings will keep the loop busy. */
+#define DEFAULT_EXIT_USEC (30*USEC_PER_SEC)
 
 #define SYSTEMD_CGROUP_CONTROLLER "name=systemd"
 
@@ -41,6 +44,7 @@
 #define LOWERCASE_LETTERS "abcdefghijklmnopqrstuvwxyz"
 #define UPPERCASE_LETTERS "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 #define LETTERS LOWERCASE_LETTERS UPPERCASE_LETTERS
+#define ALPHANUMERICAL LETTERS DIGITS
 
 #define REBOOT_PARAM_FILE "/run/systemd/reboot-param"
 
         "/usr/share/kbd/keymaps/\0"             \
         "/usr/lib/kbd/keymaps/\0"
 #endif
+
+#define UNIX_SYSTEM_BUS_ADDRESS "unix:path=/var/run/dbus/system_bus_socket"
+#define KERNEL_SYSTEM_BUS_ADDRESS "kernel:path=/sys/fs/kdbus/0-system/bus"
+
+#ifdef ENABLE_KDBUS
+#  define DEFAULT_SYSTEM_BUS_ADDRESS KERNEL_SYSTEM_BUS_ADDRESS ";" UNIX_SYSTEM_BUS_ADDRESS
+#else
+#  define DEFAULT_SYSTEM_BUS_ADDRESS UNIX_SYSTEM_BUS_ADDRESS
+#endif
+
+#define UNIX_USER_BUS_ADDRESS_FMT "unix:path=%s/bus"
+#define KERNEL_USER_BUS_ADDRESS_FMT "kernel:path=/sys/fs/kdbus/"UID_FMT"-user/bus"
+
+#define PLYMOUTH_SOCKET {                                       \
+                .un.sun_family = AF_UNIX,                       \
+                .un.sun_path = "\0/org/freedesktop/plymouthd",  \
+        }
+
+#ifndef TTY_GID
+#define TTY_GID 5
+#endif