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