]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/basic/def.h
basic: add log_level argument to timezone_is_valid
[thirdparty/systemd.git] / src / basic / def.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
c2f1db8f 2#pragma once
f6a6225e
LP
3
4/***
5 This file is part of systemd.
6
7 Copyright 2010 Lennart Poettering
f6a6225e
LP
8***/
9
10#include "util.h"
11
ecb963cc 12#define DEFAULT_TIMEOUT_USEC (90*USEC_PER_SEC)
f6a6225e 13#define DEFAULT_RESTART_USEC (100*USEC_PER_MSEC)
af6da548 14#define DEFAULT_CONFIRM_USEC (30*USEC_PER_SEC)
f6a6225e 15
3f41e1e5
LN
16#define DEFAULT_START_LIMIT_INTERVAL (10*USEC_PER_SEC)
17#define DEFAULT_START_LIMIT_BURST 5
18
f7cf00fa
LP
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)
ef9eb0a8 23
19854865
LP
24/* The default value for the net.unix.max_dgram_qlen sysctl */
25#define DEFAULT_UNIX_MAX_DGRAM_QLEN 512UL
26
f6a6225e 27#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
1cce5d63 28#define SIGNALS_IGNORE SIGPIPE
4b549144 29
349cc4a5 30#if HAVE_SPLIT_USR
0732ef7a
ZJS
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
ab9001a1 42
15ca0a42
LP
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"
7f112f50 47
1d749d04
ZJS
48#define PLYMOUTH_SOCKET { \
49 .un.sun_family = AF_UNIX, \
50 .un.sun_path = "\0/org/freedesktop/plymouthd", \
51 }
52
7079cfef
LP
53#define NOTIFY_FD_MAX 768
54#define NOTIFY_BUFFER_MAX PIPE_BUF
a0f29c76 55
349cc4a5 56#if HAVE_SPLIT_USR
ec0327d6
ZJS
57# define _CONF_PATHS_SPLIT_USR_NULSTR(n) "/lib/" n "\0"
58# define _CONF_PATHS_SPLIT_USR(n) , "/lib/" n
a0f29c76 59#else
ec0327d6 60# define _CONF_PATHS_SPLIT_USR_NULSTR(n)
3a792895 61# define _CONF_PATHS_SPLIT_USR(n)
a0f29c76 62#endif
75eb6154
LP
63
64/* Return a nulstr for a standard cascade of configuration paths,
43688c49 65 * suitable to pass to conf_files_list_nulstr() or config_parse_many_nulstr()
75eb6154
LP
66 * to implement drop-in directories for extending configuration
67 * files. */
3a792895
ZJS
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" \
ec0327d6
ZJS
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))
18991244
LP
82
83#define LONG_LINE_MAX (1U*1024U*1024U)