mirror of
https://github.com/systemd/systemd
synced 2025-11-20 17:24:45 +01:00
Compare commits
17 Commits
e8a0463c16
...
48c64813ec
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48c64813ec | ||
|
|
f102bc3e5f | ||
|
|
ac9391c552 | ||
|
|
68b476a298 | ||
|
|
29e97643e7 | ||
|
|
1ebbb0b0f4 | ||
|
|
f875a8026e | ||
|
|
6c80ab85f5 | ||
|
|
92631f1962 | ||
|
|
b8ad88a407 | ||
|
|
f0562fc819 | ||
|
|
73623f1984 | ||
|
|
c581bc8ad8 | ||
|
|
dc88805d16 | ||
|
|
e8d1a26d9c | ||
|
|
63b27d1765 | ||
|
|
bf600342af |
@ -250,9 +250,9 @@ SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
inline functions that require the full definition of a struct into the
|
||||
implementation file so that only a forward declaration of the struct is
|
||||
required and not the full definition.
|
||||
- `src/basic/forward.h` contains forward declarations for common types. If
|
||||
possible, only include `forward.h` in header files which makes circular
|
||||
header dependencies a non-issue.
|
||||
- `src/basic/basic-forward.h` contains forward declarations for common types.
|
||||
If possible, only include `basic-forward.h` in header files which makes
|
||||
circular header dependencies a non-issue.
|
||||
|
||||
Bad:
|
||||
|
||||
@ -319,13 +319,21 @@ SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
incremental builds as much as possible.
|
||||
|
||||
To avoid having to include other headers in header files, always include
|
||||
`forward.h` in each header file and then add other required includes as
|
||||
needed. `forward.h` already includes generic headers and contains forward
|
||||
declarations for common types which should be sufficient for most header
|
||||
files. For each extra include you add on top of `forward.h`, check if it can
|
||||
be replaced by adding another forward declaration to `forward.h`. Depending on
|
||||
the daemon, there might be a specific forward header to include (e.g.
|
||||
`resolved-forward.h` for systemd-resolved header files).
|
||||
the corresponding forward declaration header in each header file and then add
|
||||
other required includes as needed. The forward declaration header already
|
||||
includes generic headers and contains forward declarations for common types
|
||||
which should be sufficient for most header files. For each extra include you
|
||||
add on top of, check if it can be replaced by adding another forward
|
||||
declaration to the forward declaration header. Depending on the daemon, there
|
||||
might be a specific forward header to include (e.g. `resolved-forward.h` for
|
||||
systemd-resolved header files).
|
||||
|
||||
For common code, there are three different forward declaration headers:
|
||||
|
||||
- `src/basic`: `basic-forward.h`
|
||||
- `src/libsystemd`: `sd-forward.h`
|
||||
- `src/libsystemd-network`: `sd-forward.h`
|
||||
- `src/shared`: `shared-forward.h`
|
||||
|
||||
Header files that extend other header files can include the original header
|
||||
file. For example, `iovec-util.h` includes `iovec-fundamental.h` and
|
||||
@ -352,7 +360,7 @@ SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
```c
|
||||
// source.h
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
void my_function_that_logs(size_t sz);
|
||||
|
||||
|
||||
@ -2696,10 +2696,13 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
|
||||
<varname>OOMPolicy=kill</varname> is enabled for the unit or not. If enabled, the property contains the
|
||||
number of times the kernel OOM killer killed all the processes in the unit's cgroup and its
|
||||
descendant cgroups. If disabled, the property contains the number of processes the kernel OOM killer
|
||||
has killed in the unit's cgroup and its descendant cgroups.</para>
|
||||
has killed in the unit's cgroup and its descendant cgroups. When the corresponding cgroups have not
|
||||
been realized, it reports <constant>18446744073709551615</constant> (<constant>2^64 - 1</constant>).</para>
|
||||
|
||||
<para><varname>ManagedOOMKills</varname> contains the number of times <command>systemd-oomd</command>
|
||||
killed all the processes in the unit's cgroup and its descendant cgroups.</para>
|
||||
killed all the processes in the unit's cgroup and its descendant cgroups. When the corresponding
|
||||
cgroups have not been realized yet, it reports <constant>18446744073709551615</constant>
|
||||
(<constant>2^64 - 1</constant>).</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
|
||||
@ -44,6 +44,13 @@
|
||||
<citerefentry><refentrytitle>sd-json</refentrytitle><manvolnum>3</manvolnum></citerefentry> API for JSON
|
||||
serialization, deserialization and manipulation.</para>
|
||||
|
||||
<para>Canonical encoding rules: sd-varlink omits the <literal>"parameters"</literal> member on the wire in replies,
|
||||
errors, and notifications when there are no parameters to transmit. This reduces message size and
|
||||
avoids ambiguity. Receivers must be tolerant and accept any of the following encodings for the
|
||||
absence of parameters: an omitted <literal>"parameters"</literal> key (preferred), a JSON <literal>null</literal>
|
||||
value, or an empty object <literal>{}</literal>. When decoding, sd-varlink treats JSON <literal>null</literal>
|
||||
as if the member was omitted.</para>
|
||||
|
||||
<para>The <citerefentry><refentrytitle>varlinkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> tool
|
||||
makes the functionality implemented by sd-varlink available from the command line.</para>
|
||||
</refsect1>
|
||||
|
||||
23
man/system-or-user-ns-mountfsd.xml
Normal file
23
man/system-or-user-ns-mountfsd.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE refsect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<!--
|
||||
SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
-->
|
||||
|
||||
<refsect1>
|
||||
<title/>
|
||||
|
||||
<para id="singular">When enabled for services running in per-user instances of the service manager
|
||||
this option implicitly enables <varname>PrivateUsers=</varname> (requires unprivileged user namespaces
|
||||
support to be enabled in the kernel via the <literal>kernel.unprivileged_userns_clone=</literal> sysctl)
|
||||
and also relies on
|
||||
<citerefentry><refentrytitle>systemd-mountfsd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||
|
||||
<para id="plural">When enabled for services running in per-user instances of the service manager
|
||||
these options implicitly enable <varname>PrivateUsers=</varname> (requires unprivileged user namespaces
|
||||
support to be enabled in the kernel via the <literal>kernel.unprivileged_userns_clone=</literal> sysctl)
|
||||
and also rely on
|
||||
<citerefentry><refentrytitle>systemd-mountfsd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||
|
||||
</refsect1>
|
||||
@ -201,7 +201,7 @@
|
||||
|
||||
<xi:include href="vpick.xml" xpointer="image"/>
|
||||
|
||||
<xi:include href="system-only.xml" xpointer="singular"/>
|
||||
<xi:include href="system-or-user-ns-mountfsd.xml" xpointer="singular"/>
|
||||
|
||||
<xi:include href="version-info.xml" xpointer="v233"/></listitem>
|
||||
</varlistentry>
|
||||
@ -225,7 +225,7 @@
|
||||
<constant>esp</constant>, <constant>xbootldr</constant>, <constant>tmp</constant>,
|
||||
<constant>var</constant>.</para>
|
||||
|
||||
<xi:include href="system-only.xml" xpointer="singular"/>
|
||||
<xi:include href="system-or-user-ns-mountfsd.xml" xpointer="singular"/>
|
||||
|
||||
<xi:include href="version-info.xml" xpointer="v247"/></listitem>
|
||||
</varlistentry>
|
||||
@ -523,7 +523,7 @@
|
||||
<varname>PrivateDevices=</varname> below, as it may change the setting of
|
||||
<varname>DevicePolicy=</varname>.</para>
|
||||
|
||||
<xi:include href="system-only.xml" xpointer="singular"/>
|
||||
<xi:include href="system-or-user-ns-mountfsd.xml" xpointer="singular"/>
|
||||
|
||||
<xi:include href="version-info.xml" xpointer="v247"/></listitem>
|
||||
</varlistentry>
|
||||
@ -590,7 +590,7 @@
|
||||
|
||||
<xi:include href="vpick.xml" xpointer="image"/>
|
||||
|
||||
<xi:include href="system-only.xml" xpointer="singular"/>
|
||||
<xi:include href="system-or-user-ns-mountfsd.xml" xpointer="singular"/>
|
||||
|
||||
<xi:include href="version-info.xml" xpointer="v248"/></listitem>
|
||||
</varlistentry>
|
||||
|
||||
@ -1439,9 +1439,9 @@ libarchive = dependency('libarchive',
|
||||
required : get_option('libarchive'))
|
||||
conf.set10('HAVE_LIBARCHIVE', libarchive.found())
|
||||
conf.set10('HAVE_LIBARCHIVE_UID_IS_SET',
|
||||
libblkid.found() and cc.has_function('archive_entry_uid_is_set', dependencies : libarchive))
|
||||
libarchive.found() and cc.has_function('archive_entry_uid_is_set', dependencies : libarchive))
|
||||
conf.set10('HAVE_LIBARCHIVE_HARDLINK_IS_SET',
|
||||
libblkid.found() and cc.has_function('archive_entry_hardlink_is_set', dependencies : libarchive))
|
||||
libarchive.found() and cc.has_function('archive_entry_hardlink_is_set', dependencies : libarchive))
|
||||
|
||||
libxkbcommon = dependency('xkbcommon',
|
||||
version : '>= 0.3.0',
|
||||
@ -2083,6 +2083,7 @@ basic_includes = [
|
||||
|
||||
libsystemd_includes = [basic_includes, include_directories(
|
||||
'src/libsystemd/sd-bus',
|
||||
'src/libsystemd/sd-common',
|
||||
'src/libsystemd/sd-device',
|
||||
'src/libsystemd/sd-event',
|
||||
'src/libsystemd/sd-hwdb',
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "shared-forward.h"
|
||||
#include "unit-def.h"
|
||||
|
||||
typedef struct BootTimes {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "shared-forward.h"
|
||||
|
||||
typedef struct ExecCommand ExecCommand;
|
||||
typedef struct Unit Unit;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "shared-forward.h"
|
||||
|
||||
typedef enum RecursiveErrors RecursiveErrors;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
const char* af_to_name(int id) _const_;
|
||||
int af_from_name(const char *name) _pure_;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
#include "memory-util.h"
|
||||
|
||||
#if HAS_FEATURE_MEMORY_SANITIZER
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* Limits the use of ANSI colors to a subset. */
|
||||
typedef enum ColorMode {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <endian.h> /* IWYU pragma: keep */
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* A cleaned up architecture definition. We don't want to get lost in
|
||||
* processor features, models, generations or even ABIs. Hence we
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
extern int saved_argc;
|
||||
extern char **saved_argv;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
const char* arphrd_to_name(int id) _const_;
|
||||
int arphrd_from_name(const char *name) _pure_;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
#define AUDIT_SESSION_INVALID UINT32_MAX
|
||||
|
||||
|
||||
134
src/basic/basic-forward.h
Normal file
134
src/basic/basic-forward.h
Normal file
@ -0,0 +1,134 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
/* IWYU pragma: always_keep */
|
||||
|
||||
#include <errno.h> /* IWYU pragma: export */
|
||||
#include <inttypes.h> /* IWYU pragma: export */
|
||||
#include <limits.h> /* IWYU pragma: export */
|
||||
#include <paths.h> /* IWYU pragma: export */
|
||||
#include <stdarg.h> /* IWYU pragma: export */
|
||||
#include <stdbool.h> /* IWYU pragma: export */
|
||||
#include <stddef.h> /* IWYU pragma: export */
|
||||
#include <stdint.h> /* IWYU pragma: export */
|
||||
#include <sys/types.h> /* IWYU pragma: export */
|
||||
#include <uchar.h> /* IWYU pragma: export */
|
||||
|
||||
#include "assert-util.h" /* IWYU pragma: export */
|
||||
#include "cleanup-util.h" /* IWYU pragma: export */
|
||||
#include "macro.h" /* IWYU pragma: export */
|
||||
|
||||
/* Generic types */
|
||||
|
||||
typedef uint64_t usec_t;
|
||||
typedef uint64_t nsec_t;
|
||||
|
||||
/* Libc/Linux forward declarations */
|
||||
|
||||
struct dirent;
|
||||
struct ether_addr;
|
||||
struct fiemap;
|
||||
struct file_handle;
|
||||
struct glob_t;
|
||||
struct group;
|
||||
struct icmp6_hdr;
|
||||
struct in_addr;
|
||||
struct in6_addr;
|
||||
struct inotify_event;
|
||||
struct iovec;
|
||||
struct mount_attr;
|
||||
struct msghdr;
|
||||
struct passwd;
|
||||
struct pollfd;
|
||||
struct rlimit;
|
||||
struct sgrp;
|
||||
struct shadow;
|
||||
struct signalfd_siginfo;
|
||||
struct siphash;
|
||||
struct sockaddr;
|
||||
struct spwd;
|
||||
struct stat;
|
||||
struct statfs;
|
||||
struct statx_timestamp;
|
||||
struct statx;
|
||||
struct termios;
|
||||
struct tm;
|
||||
struct ucred;
|
||||
|
||||
/* To forward declare FILE and DIR, we have to declare the internal struct names for them. Since these are
|
||||
* used for C++ symbol name mangling, they're effectively part of the ABI and won't actually change. */
|
||||
typedef struct _IO_FILE FILE;
|
||||
typedef struct __dirstream DIR;
|
||||
|
||||
/* 3rd-party library forward declarations */
|
||||
|
||||
enum bpf_map_type;
|
||||
|
||||
struct fdisk_context;
|
||||
struct fdisk_table;
|
||||
struct crypt_device;
|
||||
|
||||
/* basic/ forward declarations */
|
||||
|
||||
typedef void (*hash_func_t)(const void *p, struct siphash *state);
|
||||
typedef int (*compare_func_t)(const void *a, const void *b);
|
||||
typedef compare_func_t comparison_fn_t;
|
||||
typedef int (*comparison_userdata_fn_t)(const void *, const void *, void *);
|
||||
|
||||
struct hash_ops;
|
||||
struct hw_addr_data;
|
||||
struct in_addr_data;
|
||||
struct iovec_wrapper;
|
||||
union in_addr_union;
|
||||
union sockaddr_union;
|
||||
|
||||
typedef enum CGroupFlags CGroupFlags;
|
||||
typedef enum CGroupMask CGroupMask;
|
||||
typedef enum ChaseFlags ChaseFlags;
|
||||
typedef enum ExtractFlags ExtractFlags;
|
||||
typedef enum Glyph Glyph;
|
||||
typedef enum ImageClass ImageClass;
|
||||
typedef enum JobMode JobMode;
|
||||
typedef enum RuntimeScope RuntimeScope;
|
||||
typedef enum TimestampStyle TimestampStyle;
|
||||
typedef enum UnitActiveState UnitActiveState;
|
||||
typedef enum UnitDependency UnitDependency;
|
||||
typedef enum UnitType UnitType;
|
||||
|
||||
typedef struct Hashmap Hashmap;
|
||||
typedef struct HashmapBase HashmapBase;
|
||||
typedef struct IteratedCache IteratedCache;
|
||||
typedef struct Iterator Iterator;
|
||||
typedef struct OrderedHashmap OrderedHashmap;
|
||||
typedef struct OrderedSet OrderedSet;
|
||||
typedef struct Set Set;
|
||||
|
||||
typedef struct dual_timestamp dual_timestamp;
|
||||
typedef struct triple_timestamp triple_timestamp;
|
||||
typedef struct ConfFile ConfFile;
|
||||
typedef struct LockFile LockFile;
|
||||
typedef struct PidRef PidRef;
|
||||
typedef struct Prioq Prioq;
|
||||
typedef struct RateLimit RateLimit;
|
||||
typedef struct SocketAddress SocketAddress;
|
||||
|
||||
/* Constants */
|
||||
|
||||
/* We duplicate various commonly used constants here so we can keep most static inline functions without
|
||||
* having to include the full header that provides these constants. */
|
||||
|
||||
#define AT_FDCWD -100
|
||||
#define AT_EMPTY_PATH 0x1000
|
||||
#define AT_SYMLINK_FOLLOW 0x400
|
||||
#define AT_SYMLINK_NOFOLLOW 0x100
|
||||
|
||||
#define MODE_INVALID ((mode_t) -1)
|
||||
|
||||
#define UID_INVALID ((uid_t) -1)
|
||||
#define GID_INVALID ((gid_t) -1)
|
||||
|
||||
#define USEC_INFINITY ((usec_t) UINT64_MAX)
|
||||
#define NSEC_INFINITY ((nsec_t) UINT64_MAX)
|
||||
|
||||
/* MAX_ERRNO is defined as 4095 in linux/err.h. We use the same value here. */
|
||||
#define ERRNO_MAX 4095
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* Bit index (0-based) to mask of specified type. Assertion failure if index is out of range. */
|
||||
#define _INDEX_TO_MASK(type, i, uniq) \
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
int btrfs_validate_subvolume_name(const char *name);
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
extern const char* const systemd_features;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
char* bus_label_escape(const char *s);
|
||||
char* bus_label_unescape_n(const char *f, size_t l);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* Space for capability_to_string() in case we write out a numeric capability because we don't know the name
|
||||
* for it. "0x3e" is the largest string we might output, in both sensese of the word "largest": two chars for
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <sys/capability.h> /* IWYU pragma: export */
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* Special marker used when storing a capabilities mask as "unset". This would need to be updated as soon as
|
||||
* Linux learns more than 63 caps. */
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
int capsule_name_is_valid(const char *name);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
#define SYSTEMD_CGROUP_CONTROLLER_LEGACY "name=systemd"
|
||||
#define SYSTEMD_CGROUP_CONTROLLER_HYBRID "name=unified"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef enum ChaseFlags {
|
||||
CHASE_PREFIX_ROOT = 1 << 0, /* The specified path will be prefixed by the specified root before beginning the iteration */
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <linux/fs.h>
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* The chattr() flags to apply when creating a new file *before* writing to it. In particular, flags such as
|
||||
* FS_NOCOW_FL don't work if applied a-posteriori. All other flags are fine (or even necessary, think
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef enum Compression {
|
||||
COMPRESSION_NONE,
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef enum ConfFilesFlags {
|
||||
CONF_FILES_EXECUTABLE = 1 << 0,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef enum ConfidentialVirtualization {
|
||||
CONFIDENTIAL_VIRTUALIZATION_NONE = 0,
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <sys/sysmacros.h>
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
int parse_devnum(const char *s, dev_t *ret);
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <dirent.h> /* IWYU pragma: export */
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
#include "path-util.h"
|
||||
|
||||
bool dirent_is_file(const struct dirent *de) _pure_;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <dlfcn.h> /* IWYU pragma: export */
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
void* safe_dlclose(void *dl);
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* Length of a single label, with all escaping removed, excluding any trailing dot or NUL byte */
|
||||
#define DNS_LABEL_MAX 63
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
#include "sd-id128.h"
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
int parse_env_filev(FILE *f, const char *fname, va_list ap);
|
||||
int parse_env_file_fdv(int fd, const char *fname, va_list ap);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
size_t sc_arg_max(void);
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
const char* errno_name_no_fallback(int id) _const_;
|
||||
int errno_from_name(const char *name) _pure_;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* strerror(3) says that glibc uses a maximum length of 1024 bytes. */
|
||||
#define ERRNO_BUF_LEN 1024
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* What characters are special in the shell? */
|
||||
/* must be escaped outside and inside double-quotes */
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <net/ethernet.h>
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* This is MAX_ADDR_LEN as defined in linux/netdevice.h, but net/if_arp.h
|
||||
* defines a macro of the same name with a much lower size. */
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef enum ExtractFlags {
|
||||
EXTRACT_RELAX = 1 << 0, /* Allow unbalanced quote and eat up trailing backslash. */
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* maximum length of fdname */
|
||||
#define FDNAME_MAX 255
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
#define LONG_LINE_MAX (1U*1024U*1024U)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
#include "stat-util.h"
|
||||
|
||||
#define FILESYSTEM_MAGIC_MAX 10
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "cgroup-util.h"
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
#include "stdio-util.h"
|
||||
|
||||
assert_cc(sizeof(pid_t) == sizeof(int32_t));
|
||||
|
||||
@ -1,325 +0,0 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
/* IWYU pragma: always_keep */
|
||||
|
||||
#include <errno.h> /* IWYU pragma: export */
|
||||
#include <inttypes.h> /* IWYU pragma: export */
|
||||
#include <limits.h> /* IWYU pragma: export */
|
||||
#include <paths.h> /* IWYU pragma: export */
|
||||
#include <stdarg.h> /* IWYU pragma: export */
|
||||
#include <stdbool.h> /* IWYU pragma: export */
|
||||
#include <stddef.h> /* IWYU pragma: export */
|
||||
#include <stdint.h> /* IWYU pragma: export */
|
||||
#include <sys/types.h> /* IWYU pragma: export */
|
||||
#include <uchar.h> /* IWYU pragma: export */
|
||||
|
||||
#include "assert-util.h" /* IWYU pragma: export */
|
||||
#include "cleanup-util.h" /* IWYU pragma: export */
|
||||
#include "macro.h" /* IWYU pragma: export */
|
||||
|
||||
/* Generic types */
|
||||
|
||||
typedef uint64_t usec_t;
|
||||
typedef uint64_t nsec_t;
|
||||
|
||||
/* Libc/Linux forward declarations */
|
||||
|
||||
struct dirent;
|
||||
struct ether_addr;
|
||||
struct fiemap;
|
||||
struct file_handle;
|
||||
struct glob_t;
|
||||
struct group;
|
||||
struct icmp6_hdr;
|
||||
struct in_addr;
|
||||
struct in6_addr;
|
||||
struct inotify_event;
|
||||
struct iovec;
|
||||
struct mount_attr;
|
||||
struct msghdr;
|
||||
struct passwd;
|
||||
struct pollfd;
|
||||
struct rlimit;
|
||||
struct sgrp;
|
||||
struct shadow;
|
||||
struct signalfd_siginfo;
|
||||
struct siphash;
|
||||
struct sockaddr;
|
||||
struct spwd;
|
||||
struct stat;
|
||||
struct statfs;
|
||||
struct statx_timestamp;
|
||||
struct statx;
|
||||
struct termios;
|
||||
struct tm;
|
||||
struct ucred;
|
||||
|
||||
/* To forward declare FILE and DIR, we have to declare the internal struct names for them. Since these are
|
||||
* used for C++ symbol name mangling, they're effectively part of the ABI and won't actually change. */
|
||||
typedef struct _IO_FILE FILE;
|
||||
typedef struct __dirstream DIR;
|
||||
|
||||
/* 3rd-party library forward declarations */
|
||||
|
||||
enum bpf_map_type;
|
||||
|
||||
struct fdisk_context;
|
||||
struct fdisk_table;
|
||||
struct crypt_device;
|
||||
|
||||
/* basic/ forward declarations */
|
||||
|
||||
typedef void (*hash_func_t)(const void *p, struct siphash *state);
|
||||
typedef int (*compare_func_t)(const void *a, const void *b);
|
||||
typedef compare_func_t comparison_fn_t;
|
||||
typedef int (*comparison_userdata_fn_t)(const void *, const void *, void *);
|
||||
|
||||
struct hash_ops;
|
||||
struct hw_addr_data;
|
||||
struct in_addr_data;
|
||||
struct iovec_wrapper;
|
||||
union in_addr_union;
|
||||
union sockaddr_union;
|
||||
|
||||
typedef enum CGroupFlags CGroupFlags;
|
||||
typedef enum CGroupMask CGroupMask;
|
||||
typedef enum ChaseFlags ChaseFlags;
|
||||
typedef enum ExtractFlags ExtractFlags;
|
||||
typedef enum Glyph Glyph;
|
||||
typedef enum ImageClass ImageClass;
|
||||
typedef enum JobMode JobMode;
|
||||
typedef enum RuntimeScope RuntimeScope;
|
||||
typedef enum TimestampStyle TimestampStyle;
|
||||
typedef enum UnitActiveState UnitActiveState;
|
||||
typedef enum UnitDependency UnitDependency;
|
||||
|
||||
typedef struct Hashmap Hashmap;
|
||||
typedef struct HashmapBase HashmapBase;
|
||||
typedef struct IteratedCache IteratedCache;
|
||||
typedef struct Iterator Iterator;
|
||||
typedef struct OrderedHashmap OrderedHashmap;
|
||||
typedef struct OrderedSet OrderedSet;
|
||||
typedef struct Set Set;
|
||||
|
||||
typedef struct dual_timestamp dual_timestamp;
|
||||
typedef struct triple_timestamp triple_timestamp;
|
||||
typedef struct ConfFile ConfFile;
|
||||
typedef struct LockFile LockFile;
|
||||
typedef struct PidRef PidRef;
|
||||
typedef struct Prioq Prioq;
|
||||
typedef struct RateLimit RateLimit;
|
||||
typedef struct SocketAddress SocketAddress;
|
||||
|
||||
/* libsystemd/ and libsystemd-network/ forward declarations */
|
||||
|
||||
typedef void (*_sd_destroy_t)(void *userdata);
|
||||
|
||||
typedef union sd_id128 sd_id128_t;
|
||||
|
||||
typedef struct sd_event sd_event;
|
||||
typedef struct sd_event_source sd_event_source;
|
||||
|
||||
typedef int (*sd_event_handler_t)(sd_event_source *s, void *userdata);
|
||||
typedef int (*sd_event_io_handler_t)(sd_event_source *s, int fd, uint32_t revents, void *userdata);
|
||||
typedef int (*sd_event_time_handler_t)(sd_event_source *s, uint64_t usec, void *userdata);
|
||||
typedef int (*sd_event_signal_handler_t)(sd_event_source *s, const struct signalfd_siginfo *si, void *userdata);
|
||||
typedef int (*sd_event_inotify_handler_t)(sd_event_source *s, const struct inotify_event *event, void *userdata);
|
||||
typedef _sd_destroy_t sd_event_destroy_t;
|
||||
|
||||
enum ENUM_TYPE_S64(sd_json_format_flags_t);
|
||||
enum ENUM_TYPE_S64(sd_json_dispatch_flags_t);
|
||||
enum ENUM_TYPE_S64(sd_json_variant_type_t);
|
||||
enum ENUM_TYPE_S64(sd_json_parse_flags_t);
|
||||
|
||||
typedef enum sd_json_format_flags_t sd_json_format_flags_t;
|
||||
typedef enum sd_json_dispatch_flags_t sd_json_dispatch_flags_t;
|
||||
typedef enum sd_json_variant_type_t sd_json_variant_type_t;
|
||||
typedef enum sd_json_parse_flags_t sd_json_parse_flags_t;
|
||||
|
||||
typedef struct sd_json_variant sd_json_variant;
|
||||
|
||||
typedef struct sd_bus sd_bus;
|
||||
typedef struct sd_bus_error sd_bus_error;
|
||||
typedef struct sd_bus_error_map sd_bus_error_map;
|
||||
typedef struct sd_bus_message sd_bus_message;
|
||||
typedef struct sd_bus_slot sd_bus_slot;
|
||||
typedef struct sd_bus_creds sd_bus_creds;
|
||||
typedef struct sd_bus_track sd_bus_track;
|
||||
typedef struct sd_bus_vtable sd_bus_vtable;
|
||||
|
||||
typedef int (*sd_bus_message_handler_t)(sd_bus_message *m, void *userdata, sd_bus_error *ret_error);
|
||||
typedef int (*sd_bus_property_get_t)(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *ret_error);
|
||||
typedef int (*sd_bus_property_set_t)(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *value, void *userdata, sd_bus_error *ret_error);
|
||||
typedef int (*sd_bus_object_find_t)(sd_bus *bus, const char *path, const char *interface, void *userdata, void **ret_found, sd_bus_error *ret_error);
|
||||
typedef int (*sd_bus_node_enumerator_t)(sd_bus *bus, const char *prefix, void *userdata, char ***ret_nodes, sd_bus_error *ret_error);
|
||||
typedef int (*sd_bus_track_handler_t)(sd_bus_track *track, void *userdata);
|
||||
typedef _sd_destroy_t sd_bus_destroy_t;
|
||||
|
||||
enum ENUM_TYPE_S64(sd_device_action_t);
|
||||
|
||||
typedef enum sd_device_action_t sd_device_action_t;
|
||||
|
||||
typedef struct sd_device sd_device;
|
||||
typedef struct sd_device_enumerator sd_device_enumerator;
|
||||
typedef struct sd_device_monitor sd_device_monitor;
|
||||
|
||||
typedef struct sd_netlink sd_netlink;
|
||||
typedef struct sd_netlink_message sd_netlink_message;
|
||||
typedef struct sd_netlink_slot sd_netlink_slot;
|
||||
|
||||
typedef int (*sd_netlink_message_handler_t)(sd_netlink *nl, sd_netlink_message *m, void *userdata);
|
||||
typedef _sd_destroy_t sd_netlink_destroy_t;
|
||||
|
||||
typedef struct sd_network_monitor sd_network_monitor;
|
||||
|
||||
enum ENUM_TYPE_S64(sd_dhcp_lease_server_type_t);
|
||||
enum ENUM_TYPE_S64(sd_lldp_rx_event_t);
|
||||
enum ENUM_TYPE_S64(sd_lldp_multicast_mode_t);
|
||||
enum ENUM_TYPE_S64(sd_ndisc_event_t);
|
||||
|
||||
typedef enum sd_dhcp_lease_server_type_t sd_dhcp_lease_server_type_t;
|
||||
typedef enum sd_lldp_rx_event_t sd_lldp_rx_event_t;
|
||||
typedef enum sd_lldp_multicast_mode_t sd_lldp_multicast_mode_t;
|
||||
typedef enum sd_ndisc_event_t sd_ndisc_event_t;
|
||||
|
||||
typedef struct sd_ipv4ll sd_ipv4ll;
|
||||
typedef struct sd_dhcp_client sd_dhcp_client;
|
||||
typedef struct sd_dhcp_lease sd_dhcp_lease;
|
||||
typedef struct sd_dhcp_route sd_dhcp_route;
|
||||
typedef struct sd_dns_resolver sd_dns_resolver;
|
||||
typedef struct sd_dhcp_server sd_dhcp_server;
|
||||
typedef struct sd_ndisc sd_ndisc;
|
||||
typedef struct sd_radv sd_radv;
|
||||
typedef struct sd_dhcp6_client sd_dhcp6_client;
|
||||
typedef struct sd_dhcp6_lease sd_dhcp6_lease;
|
||||
typedef struct sd_lldp_tx sd_lldp_tx;
|
||||
typedef struct sd_lldp_rx sd_lldp_rx;
|
||||
typedef struct sd_lldp_neighbor sd_lldp_neighbor;
|
||||
|
||||
typedef struct ICMP6Packet ICMP6Packet;
|
||||
|
||||
enum ENUM_TYPE_S64(sd_varlink_method_flags_t);
|
||||
enum ENUM_TYPE_S64(sd_varlink_interface_flags_t);
|
||||
enum ENUM_TYPE_S64(sd_varlink_symbol_type_t);
|
||||
enum ENUM_TYPE_S64(sd_varlink_field_type_t);
|
||||
enum ENUM_TYPE_S64(sd_varlink_field_direction_t);
|
||||
enum ENUM_TYPE_S64(sd_varlink_field_flags_t);
|
||||
enum ENUM_TYPE_S64(sd_varlink_idl_format_flags_t);
|
||||
enum ENUM_TYPE_S64(sd_varlink_reply_flags_t);
|
||||
enum ENUM_TYPE_S64(sd_varlink_server_flags_t);
|
||||
enum ENUM_TYPE_S64(sd_varlink_invocation_flags_t);
|
||||
|
||||
typedef enum sd_varlink_method_flags_t sd_varlink_method_flags_t;
|
||||
typedef enum sd_varlink_interface_flags_t sd_varlink_interface_flags_t;
|
||||
typedef enum sd_varlink_symbol_type_t sd_varlink_symbol_type_t;
|
||||
typedef enum sd_varlink_field_type_t sd_varlink_field_type_t;
|
||||
typedef enum sd_varlink_field_direction_t sd_varlink_field_direction_t;
|
||||
typedef enum sd_varlink_field_flags_t sd_varlink_field_flags_t;
|
||||
typedef enum sd_varlink_idl_format_flags_t sd_varlink_idl_format_flags_t;
|
||||
typedef enum sd_varlink_reply_flags_t sd_varlink_reply_flags_t;
|
||||
typedef enum sd_varlink_server_flags_t sd_varlink_server_flags_t;
|
||||
typedef enum sd_varlink_invocation_flags_t sd_varlink_invocation_flags_t;
|
||||
|
||||
typedef struct sd_varlink sd_varlink;
|
||||
typedef struct sd_varlink_server sd_varlink_server;
|
||||
typedef struct sd_varlink_field sd_varlink_field;
|
||||
typedef struct sd_varlink_symbol sd_varlink_symbol;
|
||||
typedef struct sd_varlink_interface sd_varlink_interface;
|
||||
|
||||
typedef struct sd_journal sd_journal;
|
||||
|
||||
typedef struct sd_resolve sd_resolve;
|
||||
typedef struct sd_resolve_query sd_resolve_query;
|
||||
|
||||
typedef struct sd_hwdb sd_hwdb;
|
||||
|
||||
/* shared/ forward declarations */
|
||||
|
||||
typedef int (*copy_progress_bytes_t)(uint64_t n_bytes, uint64_t bytes_per_second, void *userdata);
|
||||
typedef int (*copy_progress_path_t)(const char *path, const struct stat *st, void *userdata);
|
||||
|
||||
struct local_address;
|
||||
struct in_addr_prefix;
|
||||
struct in_addr_full;
|
||||
|
||||
typedef enum AskPasswordFlags AskPasswordFlags;
|
||||
typedef enum BootEntryTokenType BootEntryTokenType;
|
||||
typedef enum BusPrintPropertyFlags BusPrintPropertyFlags;
|
||||
typedef enum BusTransport BusTransport;
|
||||
typedef enum CatFlags CatFlags;
|
||||
typedef enum CertificateSourceType CertificateSourceType;
|
||||
typedef enum DnsCacheMode DnsCacheMode;
|
||||
typedef enum DnsOverTlsMode DnsOverTlsMode;
|
||||
typedef enum DnssecMode DnssecMode;
|
||||
typedef enum Fido2EnrollFlags Fido2EnrollFlags;
|
||||
typedef enum KeySourceType KeySourceType;
|
||||
typedef enum LabelFixFlags LabelFixFlags;
|
||||
typedef enum MountInNamespaceFlags MountInNamespaceFlags;
|
||||
typedef enum NamePolicy NamePolicy;
|
||||
typedef enum OutputFlags OutputFlags;
|
||||
typedef enum OutputMode OutputMode;
|
||||
typedef enum PagerFlags PagerFlags;
|
||||
typedef enum PatternCompileCase PatternCompileCase;
|
||||
typedef enum RemoveFlags RemoveFlags;
|
||||
typedef enum ResolveSupport ResolveSupport;
|
||||
typedef enum TPM2Flags TPM2Flags;
|
||||
typedef enum Tpm2Support Tpm2Support;
|
||||
typedef enum Tpm2UserspaceEventType Tpm2UserspaceEventType;
|
||||
typedef enum UnitFileFlags UnitFileFlags;
|
||||
typedef enum UnitFilePresetMode UnitFilePresetMode;
|
||||
typedef enum UnitFileState UnitFileState;
|
||||
typedef enum UnitType UnitType;
|
||||
typedef enum UserDBFlags UserDBFlags;
|
||||
typedef enum UserRecordLoadFlags UserRecordLoadFlags;
|
||||
typedef enum UserStorage UserStorage;
|
||||
|
||||
typedef struct Bitmap Bitmap;
|
||||
typedef struct BPFProgram BPFProgram;
|
||||
typedef struct BusObjectImplementation BusObjectImplementation;
|
||||
typedef struct CalendarSpec CalendarSpec;
|
||||
typedef struct Condition Condition;
|
||||
typedef struct ConfigSection ConfigSection;
|
||||
typedef struct ConfigTableItem ConfigTableItem;
|
||||
typedef struct CPUSet CPUSet;
|
||||
typedef struct FDSet FDSet;
|
||||
typedef struct Fido2HmacSalt Fido2HmacSalt;
|
||||
typedef struct GroupRecord GroupRecord;
|
||||
typedef struct Image Image;
|
||||
typedef struct ImagePolicy ImagePolicy;
|
||||
typedef struct InstallInfo InstallInfo;
|
||||
typedef struct LookupPaths LookupPaths;
|
||||
typedef struct LoopDevice LoopDevice;
|
||||
typedef struct MachineBindUserContext MachineBindUserContext;
|
||||
typedef struct MachineCredentialContext MachineCredentialContext;
|
||||
typedef struct MountOptions MountOptions;
|
||||
typedef struct OpenFile OpenFile;
|
||||
typedef struct Pkcs11EncryptedKey Pkcs11EncryptedKey;
|
||||
typedef struct Table Table;
|
||||
typedef struct Tpm2Context Tpm2Context;
|
||||
typedef struct Tpm2Handle Tpm2Handle;
|
||||
typedef struct Tpm2PCRValue Tpm2PCRValue;
|
||||
typedef struct UnitInfo UnitInfo;
|
||||
typedef struct UserRecord UserRecord;
|
||||
typedef struct VeritySettings VeritySettings;
|
||||
|
||||
/* Constants */
|
||||
|
||||
/* We duplicate various commonly used constants here so we can keep most static inline functions without
|
||||
* having to include the full header that provides these constants. */
|
||||
|
||||
#define AT_FDCWD -100
|
||||
#define AT_EMPTY_PATH 0x1000
|
||||
#define AT_SYMLINK_FOLLOW 0x400
|
||||
#define AT_SYMLINK_NOFOLLOW 0x100
|
||||
|
||||
#define MODE_INVALID ((mode_t) -1)
|
||||
|
||||
#define UID_INVALID ((uid_t) -1)
|
||||
#define GID_INVALID ((gid_t) -1)
|
||||
|
||||
#define USEC_INFINITY ((usec_t) UINT64_MAX)
|
||||
#define NSEC_INFINITY ((nsec_t) UINT64_MAX)
|
||||
|
||||
/* MAX_ERRNO is defined as 4095 in linux/err.h. We use the same value here. */
|
||||
#define ERRNO_MAX 4095
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
#include "lock-util.h"
|
||||
|
||||
/* The following macros add 1 when converting things, since 0 is a valid mode, while the pointer
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
int dlopen_gcrypt(void);
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <glob.h> /* IWYU pragma: export */
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef DIR* (*opendir_t)(const char *);
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef enum Glyph {
|
||||
GLYPH_SPACE,
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
char *utf8_prev_char (const char *p);
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef void (*hash_func_t)(const void *p, struct siphash *state);
|
||||
typedef int (*compare_func_t)(const void *a, const void *b);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
#include "hash-funcs.h"
|
||||
#include "iterator.h"
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
char octchar(int x) _const_;
|
||||
int unoctchar(char c) _const_;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
#include "sha256.h"
|
||||
|
||||
/* Unoptimized implementation based on FIPS 198. 'res' has to be allocated by
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
#include "strv.h"
|
||||
|
||||
char* get_default_hostname_raw(void);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
union in_addr_union {
|
||||
struct in_addr in;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
bool in_initrd(void);
|
||||
void in_initrd_force(bool value);
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
#include <sys/inotify.h> /* IWYU pragma: export */
|
||||
#include <syslog.h>
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
#define INOTIFY_EVENT_MAX (offsetof(struct inotify_event, name) + NAME_MAX + 1)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
int flush_fd(int fd);
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <sys/uio.h> /* IWYU pragma: export */
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
#include "iovec-util-fundamental.h" /* IWYU pragma: export */
|
||||
|
||||
extern const struct iovec iovec_nul_byte; /* Points to a single NUL byte */
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
struct iovec_wrapper {
|
||||
struct iovec *iovec;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* Ideally the Iterator would be an opaque struct, but it is instantiated
|
||||
* by hashmap users, so the definition has to be here. Do not use its fields
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <sys/keyctl.h> /* IWYU pragma: export */
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* Like TAKE_PTR() but for key_serial_t, resetting them to -1 */
|
||||
#define TAKE_KEY_SERIAL(key_serial) TAKE_GENERIC(key_serial, key_serial_t, -1)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef struct LabelOps {
|
||||
int (*pre)(int dir_fd, const char *path, mode_t mode);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
uint64_t physical_memory(void);
|
||||
uint64_t physical_memory_scale(uint64_t v, uint64_t max);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* The head of the linked list. Use this in the structure that shall
|
||||
* contain the head of the linked list */
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <locale.h> /* IWYU pragma: export */
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef enum LocaleVariable {
|
||||
/* We don't list LC_ALL here on purpose. People should be
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
/* Include here so consumers have LOCK_{EX,SH,NB} available. */
|
||||
#include <sys/file.h> /* IWYU pragma: export */
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef struct LockFile {
|
||||
int dir_fd;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
#include "list.h"
|
||||
|
||||
/*
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
#include <string.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef enum LogTarget{
|
||||
LOG_TARGET_CONSOLE,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
#define SD_LOGIND_ROOT_CHECK_INHIBITORS (UINT64_C(1) << 0)
|
||||
#define SD_LOGIND_REBOOT_VIA_KEXEC (UINT64_C(1) << 1)
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <math.h> /* IWYU pragma: export */
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* On some optimization level, iszero(x) is converted to (x == 0.0), and emits warning -Wfloat-equal.
|
||||
* The argument must be a floating point, i.e. one of float, double, or long double. */
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <sys/mman.h> /* IWYU pragma: export */
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
int memfd_create_wrapper(const char *name, unsigned mode);
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
#include "memory-util-fundamental.h" /* IWYU pragma: export */
|
||||
|
||||
size_t page_size(void) _pure_;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
struct pool;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef struct MemStream {
|
||||
FILE *f;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef enum MkdirFlags {
|
||||
MKDIR_FOLLOW_SYMLINK = 1 << 0,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* The limit used for /dev itself. 4MB should be enough since device nodes and symlinks don't
|
||||
* consume any space and udev isn't supposed to create regular file either. There's no limit on the
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef enum NamespaceType {
|
||||
NAMESPACE_CGROUP,
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
#define NULSTR_FOREACH(i, l) \
|
||||
for (typeof(*(l)) *(i) = (l); (i) && *(i); (i) = strchr((i), 0)+1)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
#include "hashmap.h"
|
||||
|
||||
typedef struct OrderedSet OrderedSet;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef enum ImageClass {
|
||||
IMAGE_MACHINE,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef unsigned long loadavg_t;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
#define PATH_SPLIT_BIN(x) x "sbin:" x "bin"
|
||||
#define PATH_SPLIT_BIN_NULSTR(x) x "sbin\0" x "bin\0"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/*
|
||||
* For details about the file format see RFC:
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
int parse_percent_unbounded(const char *p);
|
||||
int parse_percent(const char *p);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <sys/pidfd.h> /* IWYU pragma: export */
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
int pidfd_get_namespace(int fd, unsigned long ns_type_cmd);
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
/* An embeddable structure carrying a reference to a process. Supposed to be used when tracking processes
|
||||
* continuously. This combines a PID, a modern Linux pidfd and the 64bit inode number of the pidfd into one
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef struct Prioq Prioq;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef enum ProcCmdlineFlags {
|
||||
PROC_CMDLINE_STRIP_RD_PREFIX = 1 << 0, /* automatically strip "rd." prefix if it is set (and we are in the initrd, since otherwise we'd not consider it anyway) */
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
#include "fileio.h"
|
||||
#include "format-util.h"
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
#include "string-util.h"
|
||||
|
||||
#define procfs_file_alloca(pid, field) \
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
int procfs_get_pid_max(uint64_t *ret);
|
||||
int procfs_get_threads_max(uint64_t *ret);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
#include "parse-util.h"
|
||||
|
||||
typedef enum PressureType {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <pthread.h> /* IWYU pragma: export */
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
static inline pthread_mutex_t* pthread_mutex_lock_assert(pthread_mutex_t *mutex) {
|
||||
assert_se(pthread_mutex_lock(mutex) == 0);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
void random_bytes(void *p, size_t n) _nonnull_if_nonzero_(1, 2); /* Returns random bytes suitable for most uses, but may be insecure sometimes. */
|
||||
int crypto_random_bytes(void *p, size_t n) _nonnull_if_nonzero_(1, 2); /* Returns secure random bytes after waiting for the RNG to initialize. */
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef struct RateLimit {
|
||||
usec_t interval; /* Keep those two fields first so they can be initialized easily: */
|
||||
|
||||
@ -3,6 +3,6 @@
|
||||
|
||||
#include <sched.h> /* IWYU pragma: export */
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
pid_t raw_clone(unsigned long flags);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <dirent.h>
|
||||
|
||||
#include "forward.h"
|
||||
#include "basic-forward.h"
|
||||
|
||||
typedef enum RecurseDirFlags {
|
||||
/* Interpreted by readdir_all() */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user