]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/def.h
core/namespace: rework the return semantics of clone_device_node yet again
[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 SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
41 #define SIGNALS_IGNORE SIGPIPE
42
43 #if HAVE_SPLIT_USR
44 #define KBD_KEYMAP_DIRS \
45 "/usr/share/keymaps/\0" \
46 "/usr/share/kbd/keymaps/\0" \
47 "/usr/lib/kbd/keymaps/\0" \
48 "/lib/kbd/keymaps/\0"
49 #else
50 #define KBD_KEYMAP_DIRS \
51 "/usr/share/keymaps/\0" \
52 "/usr/share/kbd/keymaps/\0" \
53 "/usr/lib/kbd/keymaps/\0"
54 #endif
55
56 /* Note that we use the new /run prefix here (instead of /var/run) since we require them to be aliases and that way we
57 * become independent of /var being mounted */
58 #define DEFAULT_SYSTEM_BUS_ADDRESS "unix:path=/run/dbus/system_bus_socket"
59 #define DEFAULT_USER_BUS_ADDRESS_FMT "unix:path=%s/bus"
60
61 #define PLYMOUTH_SOCKET { \
62 .un.sun_family = AF_UNIX, \
63 .un.sun_path = "\0/org/freedesktop/plymouthd", \
64 }
65
66 #define NOTIFY_FD_MAX 768
67 #define NOTIFY_BUFFER_MAX PIPE_BUF
68
69 #if HAVE_SPLIT_USR
70 # define _CONF_PATHS_SPLIT_USR(n) "/lib/" n "\0"
71 #else
72 # define _CONF_PATHS_SPLIT_USR(n)
73 #endif
74
75 /* Return a nulstr for a standard cascade of configuration paths,
76 * suitable to pass to conf_files_list_nulstr() or config_parse_many_nulstr()
77 * to implement drop-in directories for extending configuration
78 * files. */
79 #define CONF_PATHS_NULSTR(n) \
80 "/etc/" n "\0" \
81 "/run/" n "\0" \
82 "/usr/local/lib/" n "\0" \
83 "/usr/lib/" n "\0" \
84 _CONF_PATHS_SPLIT_USR(n)
85
86 #define LONG_LINE_MAX (1U*1024U*1024U)