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