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