]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/def.h
tree-wide: drop license boilerplate
[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(n) "/lib/" n "\0"
58 #else
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(n)
72
73 #define LONG_LINE_MAX (1U*1024U*1024U)