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