chiark / gitweb /
path-util: Add hidden suffixes for ucf (#3131)
[elogind.git] / src / basic / def.h
1 #pragma once
2
3 /***
4   This file is part of systemd.
5
6   Copyright 2010 Lennart Poettering
7
8   systemd is free software; you can redistribute it and/or modify it
9   under the terms of the GNU Lesser General Public License as published by
10   the Free Software Foundation; either version 2.1 of the License, or
11   (at your option) any later version.
12
13   systemd is distributed in the hope that it will be useful, but
14   WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16   Lesser General Public License for more details.
17
18   You should have received a copy of the GNU Lesser General Public License
19   along with systemd; If not, see <http://www.gnu.org/licenses/>.
20 ***/
21
22 #include "util.h"
23
24 #define DEFAULT_TIMEOUT_USEC (90*USEC_PER_SEC)
25 #define DEFAULT_RESTART_USEC (100*USEC_PER_MSEC)
26 #define DEFAULT_CONFIRM_USEC (30*USEC_PER_SEC)
27
28 #define DEFAULT_START_LIMIT_INTERVAL (10*USEC_PER_SEC)
29 #define DEFAULT_START_LIMIT_BURST 5
30
31 /* The default time after which exit-on-idle services exit. This
32  * should be kept lower than the watchdog timeout, because otherwise
33  * the watchdog pings will keep the loop busy. */
34 #define DEFAULT_EXIT_USEC (30*USEC_PER_SEC)
35
36 #ifndef SYSTEMD_CGROUP_CONTROLLER
37 #  define SYSTEMD_CGROUP_CONTROLLER "name=elogind"
38 #endif
39
40 #define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
41 #define SIGNALS_IGNORE SIGPIPE
42
43 #define REBOOT_PARAM_FILE "/run/systemd/reboot-param"
44
45 #ifdef HAVE_SPLIT_USR
46 #define KBD_KEYMAP_DIRS                         \
47         "/usr/share/keymaps/\0"                 \
48         "/usr/share/kbd/keymaps/\0"             \
49         "/usr/lib/kbd/keymaps/\0"               \
50         "/lib/kbd/keymaps/\0"
51 #else
52 #define KBD_KEYMAP_DIRS                         \
53         "/usr/share/keymaps/\0"                 \
54         "/usr/share/kbd/keymaps/\0"             \
55         "/usr/lib/kbd/keymaps/\0"
56 #endif
57
58 #define UNIX_SYSTEM_BUS_ADDRESS "unix:path=/var/run/dbus/system_bus_socket"
59 #define KERNEL_SYSTEM_BUS_ADDRESS "kernel:path=/sys/fs/kdbus/0-system/bus"
60 #define DEFAULT_SYSTEM_BUS_ADDRESS KERNEL_SYSTEM_BUS_ADDRESS ";" UNIX_SYSTEM_BUS_ADDRESS
61 #define UNIX_USER_BUS_ADDRESS_FMT "unix:path=%s/bus"
62 #define KERNEL_USER_BUS_ADDRESS_FMT "kernel:path=/sys/fs/kdbus/"UID_FMT"-user/bus"
63
64 #define PLYMOUTH_SOCKET {                                       \
65                 .un.sun_family = AF_UNIX,                       \
66                 .un.sun_path = "\0/org/freedesktop/plymouthd",  \
67         }
68
69 #ifndef TTY_GID
70 #define TTY_GID 5
71 #endif
72
73 #define NOTIFY_FD_MAX 768
74 #define NOTIFY_BUFFER_MAX PIPE_BUF
75
76 #ifdef HAVE_SPLIT_USR
77 #define _CONF_PATHS_SPLIT_USR(n) "/lib/" n "\0"
78 #else
79 #define _CONF_PATHS_SPLIT_USR(n)
80 #endif
81
82 /* Return a nulstr for a standard cascade of configuration paths,
83  * suitable to pass to conf_files_list_nulstr() or config_parse_many()
84  * to implement drop-in directories for extending configuration
85  * files. */
86 #define CONF_PATHS_NULSTR(n) \
87         "/etc/" n "\0" \
88         "/run/" n "\0" \
89         "/usr/local/lib/" n "\0" \
90         "/usr/lib/" n "\0" \
91         _CONF_PATHS_SPLIT_USR(n)