]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/def.h
tree-wide: remove Lennart's copyright lines
[thirdparty/systemd.git] / src / basic / def.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 #include "util.h"
5
6 #define DEFAULT_TIMEOUT_USEC (90*USEC_PER_SEC)
7 #define DEFAULT_RESTART_USEC (100*USEC_PER_MSEC)
8 #define DEFAULT_CONFIRM_USEC (30*USEC_PER_SEC)
9
10 #define DEFAULT_START_LIMIT_INTERVAL (10*USEC_PER_SEC)
11 #define DEFAULT_START_LIMIT_BURST 5
12
13 /* The default time after which exit-on-idle services exit. This
14 * should be kept lower than the watchdog timeout, because otherwise
15 * the watchdog pings will keep the loop busy. */
16 #define DEFAULT_EXIT_USEC (30*USEC_PER_SEC)
17
18 /* The default value for the net.unix.max_dgram_qlen sysctl */
19 #define DEFAULT_UNIX_MAX_DGRAM_QLEN 512UL
20
21 #define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
22 #define SIGNALS_IGNORE SIGPIPE
23
24 #if HAVE_SPLIT_USR
25 #define KBD_KEYMAP_DIRS \
26 "/usr/share/keymaps/\0" \
27 "/usr/share/kbd/keymaps/\0" \
28 "/usr/lib/kbd/keymaps/\0" \
29 "/lib/kbd/keymaps/\0"
30 #else
31 #define KBD_KEYMAP_DIRS \
32 "/usr/share/keymaps/\0" \
33 "/usr/share/kbd/keymaps/\0" \
34 "/usr/lib/kbd/keymaps/\0"
35 #endif
36
37 /* Note that we use the new /run prefix here (instead of /var/run) since we require them to be aliases and that way we
38 * become independent of /var being mounted */
39 #define DEFAULT_SYSTEM_BUS_ADDRESS "unix:path=/run/dbus/system_bus_socket"
40 #define DEFAULT_USER_BUS_ADDRESS_FMT "unix:path=%s/bus"
41
42 #define PLYMOUTH_SOCKET { \
43 .un.sun_family = AF_UNIX, \
44 .un.sun_path = "\0/org/freedesktop/plymouthd", \
45 }
46
47 #define NOTIFY_FD_MAX 768
48 #define NOTIFY_BUFFER_MAX PIPE_BUF
49
50 #if HAVE_SPLIT_USR
51 # define _CONF_PATHS_SPLIT_USR_NULSTR(n) "/lib/" n "\0"
52 # define _CONF_PATHS_SPLIT_USR(n) , "/lib/" n
53 #else
54 # define _CONF_PATHS_SPLIT_USR_NULSTR(n)
55 # define _CONF_PATHS_SPLIT_USR(n)
56 #endif
57
58 /* Return a nulstr for a standard cascade of configuration paths,
59 * suitable to pass to conf_files_list_nulstr() or config_parse_many_nulstr()
60 * to implement drop-in directories for extending configuration
61 * files. */
62 #define CONF_PATHS_NULSTR(n) \
63 "/etc/" n "\0" \
64 "/run/" n "\0" \
65 "/usr/local/lib/" n "\0" \
66 "/usr/lib/" n "\0" \
67 _CONF_PATHS_SPLIT_USR_NULSTR(n)
68
69 #define CONF_PATHS_STRV(n) \
70 STRV_MAKE( \
71 "/etc/" n, \
72 "/run/" n, \
73 "/usr/local/lib/" n, \
74 "/usr/lib/" n \
75 _CONF_PATHS_SPLIT_USR(n))
76
77 #define LONG_LINE_MAX (1U*1024U*1024U)