Reduce the number of transitive includes (#37364)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <getopt.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "ansi-color.h"
|
||||
#include "battery-util.h"
|
||||
#include "build.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-calendar.h"
|
||||
#include "calendarspec.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-chid.h"
|
||||
#include "chid-fundamental.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-critical-chain.h"
|
||||
#include "analyze-time-data.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-dot.h"
|
||||
#include "bus-error.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-fdstore.h"
|
||||
#include "bus-error.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-filesystems.h"
|
||||
#include "fileio.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-image-policy.h"
|
||||
#include "format-table.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "sd-json.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-inspect-elf.h"
|
||||
#include "chase.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-pcrs.h"
|
||||
#include "fileio.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-plot.h"
|
||||
#include "analyze-time-data.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-smbios11.h"
|
||||
#include "escape.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-srk.h"
|
||||
#include "fileio.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-syscall-filter.h"
|
||||
#include "fd-util.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-time-data.h"
|
||||
#include "bus-error.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-time.h"
|
||||
#include "analyze-time-data.h"
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <fnmatch.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-unit-files.h"
|
||||
#include "path-lookup.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "analyze.h"
|
||||
#include "analyze-verify.h"
|
||||
#include "analyze-verify-util.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "sd-varlink.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "ask-password-api.h"
|
||||
#include "build.h"
|
||||
#include "bus-polkit.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "af-list.h"
|
||||
#include "macro.h"
|
||||
#include "string-util.h"
|
||||
|
||||
static const struct af_name* lookup_af(register const char *str, register GPERF_LEN_TYPE len);
|
||||
|
||||
@@ -23,6 +24,20 @@ const char* af_to_name(int id) {
|
||||
return af_names[id];
|
||||
}
|
||||
|
||||
const char* af_to_name_short(int id) {
|
||||
const char *f;
|
||||
|
||||
if (id == AF_UNSPEC)
|
||||
return "*";
|
||||
|
||||
f = af_to_name(id);
|
||||
if (!f)
|
||||
return "unknown";
|
||||
|
||||
assert(startswith(f, "AF_"));
|
||||
return f + 3;
|
||||
}
|
||||
|
||||
int af_from_name(const char *name) {
|
||||
const struct af_name *sc;
|
||||
|
||||
|
||||
+4
-18
@@ -1,26 +1,12 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include "macro.h"
|
||||
|
||||
#include "string-util.h"
|
||||
const char* af_to_name(int id) _const_;
|
||||
int af_from_name(const char *name) _pure_;
|
||||
|
||||
const char* af_to_name(int id);
|
||||
int af_from_name(const char *name);
|
||||
|
||||
static inline const char* af_to_name_short(int id) {
|
||||
const char *f;
|
||||
|
||||
if (id == AF_UNSPEC)
|
||||
return "*";
|
||||
|
||||
f = af_to_name(id);
|
||||
if (!f)
|
||||
return "unknown";
|
||||
|
||||
assert(startswith(f, "AF_"));
|
||||
return f + 3;
|
||||
}
|
||||
const char* af_to_name_short(int id) _const_;
|
||||
|
||||
const char* af_to_ipv4_ipv6(int id);
|
||||
int af_from_ipv4_ipv6(const char *af);
|
||||
|
||||
@@ -3,10 +3,13 @@
|
||||
#include <linux/btrfs.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "btrfs.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "path-util.h"
|
||||
#include "string-util.h"
|
||||
|
||||
int btrfs_validate_subvolume_name(const char *name) {
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "capsule-util.h"
|
||||
#include "path-util.h"
|
||||
#include "user-util.h"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "cgroup-util.h"
|
||||
#include "constants.h"
|
||||
#include "dirent-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "chase.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
@@ -11,6 +12,7 @@
|
||||
#include "log.h"
|
||||
#include "path-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "user-util.h"
|
||||
|
||||
bool unsafe_transition(const struct stat *a, const struct stat *b) {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "chase.h"
|
||||
#include "conf-files.h"
|
||||
#include "constants.h"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "chase.h"
|
||||
#include "devnum-util.h"
|
||||
#include "parse-util.h"
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "socket-util.h"
|
||||
#include "stdio-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "sync-util.h"
|
||||
#include "terminal-util.h"
|
||||
#include "tmpfile-util.h"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "btrfs.h"
|
||||
#include "chattr-util.h"
|
||||
#include "dirent-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
@@ -376,6 +377,10 @@ int fd_warn_permissions(const char *path, int fd) {
|
||||
return stat_warn_permissions(path, &st);
|
||||
}
|
||||
|
||||
int access_nofollow(const char *path, mode_t mode) {
|
||||
return RET_NERRNO(faccessat(AT_FDCWD, path, mode, AT_SYMLINK_NOFOLLOW));
|
||||
}
|
||||
|
||||
int touch_fd(int fd, usec_t stamp) {
|
||||
assert(fd >= 0);
|
||||
|
||||
@@ -425,6 +430,10 @@ int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gi
|
||||
return RET_GATHER(ret, touch_fd(fd, stamp));
|
||||
}
|
||||
|
||||
int touch(const char *path) {
|
||||
return touch_file(path, false, USEC_INFINITY, UID_INVALID, GID_INVALID, MODE_INVALID);
|
||||
}
|
||||
|
||||
int symlinkat_idempotent(const char *from, int atfd, const char *to, bool make_relative) {
|
||||
_cleanup_free_ char *relpath = NULL;
|
||||
int r;
|
||||
@@ -676,6 +685,16 @@ int unlink_or_warn(const char *filename) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *rmdir_and_free(char *p) {
|
||||
PROTECT_ERRNO;
|
||||
|
||||
if (!p)
|
||||
return NULL;
|
||||
|
||||
(void) rmdir(p);
|
||||
return mfree(p);
|
||||
}
|
||||
|
||||
int access_fd(int fd, int mode) {
|
||||
assert(fd >= 0);
|
||||
|
||||
|
||||
+4
-19
@@ -10,11 +10,9 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "lock-util.h"
|
||||
#include "memory-util.h"
|
||||
#include "time-util.h"
|
||||
#include "user-util.h"
|
||||
|
||||
#define MODE_INVALID ((mode_t) -1)
|
||||
|
||||
@@ -51,16 +49,11 @@ int futimens_opath(int fd, const struct timespec ts[2]);
|
||||
int fd_warn_permissions(const char *path, int fd);
|
||||
int stat_warn_permissions(const char *path, const struct stat *st);
|
||||
|
||||
#define access_nofollow(path, mode) \
|
||||
RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW))
|
||||
int access_nofollow(const char *path, mode_t mode);
|
||||
|
||||
int touch_fd(int fd, usec_t stamp);
|
||||
|
||||
int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
|
||||
|
||||
static inline int touch(const char *path) {
|
||||
return touch_file(path, false, USEC_INFINITY, UID_INVALID, GID_INVALID, MODE_INVALID);
|
||||
}
|
||||
int touch(const char *path);
|
||||
|
||||
int symlinkat_idempotent(const char *from, int atfd, const char *to, bool make_relative);
|
||||
static inline int symlink_idempotent(const char *from, const char *to, bool make_relative) {
|
||||
@@ -90,15 +83,7 @@ int var_tmp_dir(const char **ret);
|
||||
int unlink_or_warn(const char *filename);
|
||||
|
||||
/* Useful for usage with _cleanup_(), removes a directory and frees the pointer */
|
||||
static inline char *rmdir_and_free(char *p) {
|
||||
PROTECT_ERRNO;
|
||||
|
||||
if (!p)
|
||||
return NULL;
|
||||
|
||||
(void) rmdir(p);
|
||||
return mfree(p);
|
||||
}
|
||||
char *rmdir_and_free(char *p);
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(char*, rmdir_and_free);
|
||||
|
||||
static inline char* unlink_and_free(char *p) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "env-util.h"
|
||||
#include "glyph-util.h"
|
||||
#include "locale-util.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "iovec-util.h"
|
||||
#include "string-util.h"
|
||||
|
||||
@@ -51,6 +52,20 @@ bool iovec_increment(struct iovec *iovec, size_t n, size_t k) {
|
||||
return true;
|
||||
}
|
||||
|
||||
struct iovec* iovec_make_string(struct iovec *iovec, const char *s) {
|
||||
assert(iovec);
|
||||
|
||||
*iovec = IOVEC_MAKE(s, strlen_ptr(s));
|
||||
return iovec;
|
||||
}
|
||||
|
||||
void iovec_done_erase(struct iovec *iovec) {
|
||||
assert(iovec);
|
||||
|
||||
iovec->iov_base = erase_and_free(iovec->iov_base);
|
||||
iovec->iov_len = 0;
|
||||
}
|
||||
|
||||
char* set_iovec_string_field(struct iovec *iovec, size_t *n_iovec, const char *field, const char *value) {
|
||||
char *x;
|
||||
|
||||
@@ -83,6 +98,33 @@ void iovec_array_free(struct iovec *iovec, size_t n_iovec) {
|
||||
free(iovec);
|
||||
}
|
||||
|
||||
int iovec_memcmp(const struct iovec *a, const struct iovec *b) {
|
||||
|
||||
if (a == b)
|
||||
return 0;
|
||||
|
||||
return memcmp_nn(a ? a->iov_base : NULL,
|
||||
a ? a->iov_len : 0,
|
||||
b ? b->iov_base : NULL,
|
||||
b ? b->iov_len : 0);
|
||||
}
|
||||
|
||||
struct iovec* iovec_memdup(const struct iovec *source, struct iovec *ret) {
|
||||
assert(ret);
|
||||
|
||||
if (!iovec_is_set(source))
|
||||
*ret = (struct iovec) {};
|
||||
else {
|
||||
void *p = memdup(source->iov_base, source->iov_len);
|
||||
if (!p)
|
||||
return NULL;
|
||||
|
||||
*ret = IOVEC_MAKE(p, source->iov_len);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct iovec* iovec_append(struct iovec *iovec, const struct iovec *append) {
|
||||
assert(iovec_is_valid(iovec));
|
||||
|
||||
|
||||
+4
-38
@@ -5,7 +5,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "iovec-util-fundamental.h"
|
||||
#include "macro.h"
|
||||
|
||||
@@ -16,12 +15,7 @@ size_t iovec_total_size(const struct iovec *iovec, size_t n) _nonnull_if_nonzero
|
||||
|
||||
bool iovec_increment(struct iovec *iovec, size_t n, size_t k) _nonnull_if_nonzero_(1, 2);
|
||||
|
||||
static inline struct iovec* iovec_make_string(struct iovec *iovec, const char *s) {
|
||||
assert(iovec);
|
||||
/* We don't use strlen_ptr() here, because we don't want to include string-util.h for now */
|
||||
*iovec = IOVEC_MAKE(s, s ? strlen(s) : 0);
|
||||
return iovec;
|
||||
}
|
||||
struct iovec* iovec_make_string(struct iovec *iovec, const char *s);
|
||||
|
||||
#define IOVEC_MAKE_STRING(s) \
|
||||
*iovec_make_string(&(struct iovec) {}, s)
|
||||
@@ -32,43 +26,15 @@ static inline struct iovec* iovec_make_string(struct iovec *iovec, const char *s
|
||||
.iov_len = STRLEN(s), \
|
||||
}
|
||||
|
||||
static inline void iovec_done_erase(struct iovec *iovec) {
|
||||
assert(iovec);
|
||||
|
||||
iovec->iov_base = erase_and_free(iovec->iov_base);
|
||||
iovec->iov_len = 0;
|
||||
}
|
||||
void iovec_done_erase(struct iovec *iovec);
|
||||
|
||||
char* set_iovec_string_field(struct iovec *iovec, size_t *n_iovec, const char *field, const char *value);
|
||||
char* set_iovec_string_field_free(struct iovec *iovec, size_t *n_iovec, const char *field, char *value);
|
||||
|
||||
void iovec_array_free(struct iovec *iovec, size_t n_iovec) _nonnull_if_nonzero_(1, 2);
|
||||
|
||||
static inline int iovec_memcmp(const struct iovec *a, const struct iovec *b) {
|
||||
int iovec_memcmp(const struct iovec *a, const struct iovec *b) _pure_;
|
||||
|
||||
if (a == b)
|
||||
return 0;
|
||||
|
||||
return memcmp_nn(a ? a->iov_base : NULL,
|
||||
a ? a->iov_len : 0,
|
||||
b ? b->iov_base : NULL,
|
||||
b ? b->iov_len : 0);
|
||||
}
|
||||
|
||||
static inline struct iovec* iovec_memdup(const struct iovec *source, struct iovec *ret) {
|
||||
assert(ret);
|
||||
|
||||
if (!iovec_is_set(source))
|
||||
*ret = (struct iovec) {};
|
||||
else {
|
||||
void *p = memdup(source->iov_base, source->iov_len);
|
||||
if (!p)
|
||||
return NULL;
|
||||
|
||||
*ret = IOVEC_MAKE(p, source->iov_len);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
struct iovec* iovec_memdup(const struct iovec *source, struct iovec *ret);
|
||||
|
||||
struct iovec* iovec_append(struct iovec *iovec, const struct iovec *append);
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "lock-util.h"
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
|
||||
#include <threads.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "env-util.h"
|
||||
#include "iovec-util.h"
|
||||
#include "log.h"
|
||||
#include "log-context.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
|
||||
static int saved_log_context_enabled = -1;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "argv-util.h"
|
||||
#include "env-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "format-util.h"
|
||||
#include "iovec-util.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "alloc-util.h"
|
||||
#include "btrfs.h"
|
||||
#include "chase.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "chase.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "filesystems.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "nulstr-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "dirent-util.h"
|
||||
#include "env-file.h"
|
||||
#include "env-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "chase.h"
|
||||
#include "errno-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fs-util.h"
|
||||
@@ -21,6 +22,13 @@
|
||||
#include "strv.h"
|
||||
#include "time-util.h"
|
||||
|
||||
bool is_path(const char *p) {
|
||||
if (!p) /* A NULL pointer is definitely not a path */
|
||||
return false;
|
||||
|
||||
return strchr(p, '/');
|
||||
}
|
||||
|
||||
int path_split_and_make_absolute(const char *p, char ***ret) {
|
||||
_cleanup_strv_free_ char **l = NULL;
|
||||
int r;
|
||||
@@ -344,6 +352,10 @@ char** path_strv_resolve_uniq(char **l, const char *root) {
|
||||
return strv_uniq(l);
|
||||
}
|
||||
|
||||
char* skip_leading_slash(const char *p) {
|
||||
return skip_leading_chars(p, "/");
|
||||
}
|
||||
|
||||
char* path_simplify_full(char *path, PathSimplifyFlags flags) {
|
||||
bool add_slash = false, keep_trailing_slash, absolute, beginning = true;
|
||||
char *f = path;
|
||||
@@ -405,6 +417,22 @@ char* path_simplify_full(char *path, PathSimplifyFlags flags) {
|
||||
return path;
|
||||
}
|
||||
|
||||
int path_simplify_alloc(const char *path, char **ret) {
|
||||
assert(ret);
|
||||
|
||||
if (!path) {
|
||||
*ret = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *t = strdup(path);
|
||||
if (!t)
|
||||
return -ENOMEM;
|
||||
|
||||
*ret = path_simplify(t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
char* path_startswith_full(const char *path, const char *prefix, bool accept_dot_dot) {
|
||||
assert(path);
|
||||
assert(prefix);
|
||||
@@ -1360,6 +1388,10 @@ bool empty_or_root(const char *path) {
|
||||
return path_equal(path, "/");
|
||||
}
|
||||
|
||||
const char* empty_to_root(const char *path) {
|
||||
return isempty(path) ? "/" : path;
|
||||
}
|
||||
|
||||
bool path_strv_contains(char * const *l, const char *path) {
|
||||
assert(path);
|
||||
|
||||
|
||||
+4
-31
@@ -1,14 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <alloca.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "macro.h"
|
||||
#include "stat-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "time-util.h"
|
||||
|
||||
#define PATH_SPLIT_BIN(x) x "sbin:" x "bin"
|
||||
@@ -32,12 +28,7 @@ static inline const char* default_user_PATH(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool is_path(const char *p) {
|
||||
if (!p) /* A NULL pointer is definitely not a path */
|
||||
return false;
|
||||
|
||||
return strchr(p, '/');
|
||||
}
|
||||
bool is_path(const char *p) _pure_;
|
||||
|
||||
static inline bool path_is_absolute(const char *p) {
|
||||
if (!p) /* A NULL pointer is definitely not an absolute path */
|
||||
@@ -76,9 +67,7 @@ char* path_extend_internal(char **x, ...);
|
||||
#define path_extend(x, ...) path_extend_internal(x, __VA_ARGS__, POINTER_MAX)
|
||||
#define path_join(...) path_extend_internal(NULL, __VA_ARGS__, POINTER_MAX)
|
||||
|
||||
static inline char* skip_leading_slash(const char *p) {
|
||||
return skip_leading_chars(p, "/");
|
||||
}
|
||||
char* skip_leading_slash(const char *p) _pure_;
|
||||
|
||||
typedef enum PathSimplifyFlags {
|
||||
PATH_SIMPLIFY_KEEP_TRAILING_SLASH = 1 << 0,
|
||||
@@ -89,21 +78,7 @@ static inline char* path_simplify(char *path) {
|
||||
return path_simplify_full(path, 0);
|
||||
}
|
||||
|
||||
static inline int path_simplify_alloc(const char *path, char **ret) {
|
||||
assert(ret);
|
||||
|
||||
if (!path) {
|
||||
*ret = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *t = strdup(path);
|
||||
if (!t)
|
||||
return -ENOMEM;
|
||||
|
||||
*ret = path_simplify(t);
|
||||
return 0;
|
||||
}
|
||||
int path_simplify_alloc(const char *path, char **ret);
|
||||
|
||||
/* Note: the search terminates on the first NULL item. */
|
||||
#define PATH_IN_SET(p, ...) path_strv_contains(STRV_MAKE(__VA_ARGS__), p)
|
||||
@@ -195,9 +170,7 @@ static inline const char* skip_dev_prefix(const char *p) {
|
||||
}
|
||||
|
||||
bool empty_or_root(const char *path);
|
||||
static inline const char* empty_to_root(const char *path) {
|
||||
return isempty(path) ? "/" : path;
|
||||
}
|
||||
const char* empty_to_root(const char *path) _pure_;
|
||||
|
||||
bool path_strv_contains(char * const *l, const char *path);
|
||||
bool prefixed_path_strv_contains(char * const *l, const char *path);
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "macro.h"
|
||||
#include "memory-util.h"
|
||||
|
||||
typedef void (*free_func_t)(void *p);
|
||||
|
||||
/* A framework for registering static variables that shall be freed on shutdown of a process. It's a bit like gcc's
|
||||
* destructor attribute, but allows us to precisely schedule when we want to free the variables. This is supposed to
|
||||
* feel a bit like the gcc cleanup attribute, but for static variables. Note that this does not work for static
|
||||
|
||||
@@ -405,6 +405,15 @@ int strv_split_newlines_full(char ***ret, const char *s, ExtractFlags flags) {
|
||||
return n;
|
||||
}
|
||||
|
||||
char** strv_split_newlines(const char *s) {
|
||||
char **ret;
|
||||
|
||||
if (strv_split_newlines_full(&ret, s, 0) < 0)
|
||||
return NULL;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int strv_split_full(char ***t, const char *s, const char *separators, ExtractFlags flags) {
|
||||
_cleanup_strv_free_ char **l = NULL;
|
||||
size_t n = 0;
|
||||
@@ -440,6 +449,15 @@ int strv_split_full(char ***t, const char *s, const char *separators, ExtractFla
|
||||
return (int) n;
|
||||
}
|
||||
|
||||
char** strv_split(const char *s, const char *separators) {
|
||||
char **ret;
|
||||
|
||||
if (strv_split_full(&ret, s, separators, EXTRACT_RETAIN_ESCAPE) < 0)
|
||||
return NULL;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int strv_split_and_extend_full(char ***t, const char *s, const char *separators, bool filter_duplicates, ExtractFlags flags) {
|
||||
char **l;
|
||||
int r;
|
||||
@@ -458,6 +476,10 @@ int strv_split_and_extend_full(char ***t, const char *s, const char *separators,
|
||||
return (int) strv_length(*t);
|
||||
}
|
||||
|
||||
int strv_split_and_extend(char ***t, const char *s, const char *separators, bool filter_duplicates) {
|
||||
return strv_split_and_extend_full(t, s, separators, filter_duplicates, 0);
|
||||
}
|
||||
|
||||
int strv_split_colon_pairs(char ***t, const char *s) {
|
||||
_cleanup_strv_free_ char **l = NULL;
|
||||
size_t n = 0;
|
||||
|
||||
+6
-21
@@ -1,17 +1,16 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <fnmatch.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "hashmap.h"
|
||||
#include "macro.h"
|
||||
#include "string-util.h"
|
||||
#include "memory-util.h"
|
||||
|
||||
typedef enum ExtractFlags ExtractFlags;
|
||||
|
||||
char* strv_find(char * const *l, const char *name) _pure_;
|
||||
char* strv_find_case(char * const *l, const char *name) _pure_;
|
||||
@@ -113,27 +112,13 @@ static inline bool strv_isempty(char * const *l) {
|
||||
}
|
||||
|
||||
int strv_split_full(char ***t, const char *s, const char *separators, ExtractFlags flags);
|
||||
static inline char** strv_split(const char *s, const char *separators) {
|
||||
char **ret;
|
||||
|
||||
if (strv_split_full(&ret, s, separators, EXTRACT_RETAIN_ESCAPE) < 0)
|
||||
return NULL;
|
||||
|
||||
return ret;
|
||||
}
|
||||
char** strv_split(const char *s, const char *separators);
|
||||
|
||||
int strv_split_and_extend_full(char ***t, const char *s, const char *separators, bool filter_duplicates, ExtractFlags flags);
|
||||
#define strv_split_and_extend(t, s, sep, dup) strv_split_and_extend_full(t, s, sep, dup, 0)
|
||||
int strv_split_and_extend(char ***t, const char *s, const char *separators, bool filter_duplicates);
|
||||
|
||||
int strv_split_newlines_full(char ***ret, const char *s, ExtractFlags flags);
|
||||
static inline char** strv_split_newlines(const char *s) {
|
||||
char **ret;
|
||||
|
||||
if (strv_split_newlines_full(&ret, s, 0) < 0)
|
||||
return NULL;
|
||||
|
||||
return ret;
|
||||
}
|
||||
char** strv_split_newlines(const char *s);
|
||||
|
||||
/* Given a string containing white-space separated tuples of words themselves separated by ':',
|
||||
* returns a vector of strings. If the second element in a tuple is missing, the corresponding
|
||||
|
||||
@@ -3,10 +3,13 @@
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "log.h"
|
||||
#include "path-util.h"
|
||||
#include "string-util.h"
|
||||
#include "sync-util.h"
|
||||
|
||||
int fsync_directory_of_file(int fd) {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "af-list.h"
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "log.h"
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "devnum-util.h"
|
||||
#include "env-util.h"
|
||||
#include "errno-list.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "glob-util.h"
|
||||
#include "hash-funcs.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "log.h"
|
||||
#include "memory-util.h"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "alloc-util.h"
|
||||
#include "chase.h"
|
||||
#include "errno-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "format-util.h"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "dirent-util.h"
|
||||
#include "env-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "log.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "sd-messages.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "battery-util.h"
|
||||
#include "build.h"
|
||||
#include "errno-util.h"
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "build.h"
|
||||
#include "conf-files.h"
|
||||
#include "constants.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "log.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "parse-util.h"
|
||||
#include "path-util.h"
|
||||
#include "pretty-print.h"
|
||||
#include "strv.h"
|
||||
#include "sync-util.h"
|
||||
#include "terminal-util.h"
|
||||
#include "verbs.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bootctl.h"
|
||||
#include "bootctl-install.h"
|
||||
#include "bootctl-random-seed.h"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <uchar.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bootctl.h"
|
||||
#include "bootctl-set-efivar.h"
|
||||
#include "efi-loader.h"
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <fnmatch.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bootctl.h"
|
||||
#include "bootctl-status.h"
|
||||
#include "bootctl-util.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bootctl.h"
|
||||
#include "bootctl-util.h"
|
||||
#include "errno-util.h"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "apparmor-setup.h"
|
||||
#include "apparmor-util.h"
|
||||
#include "errno-util.h"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <fnmatch.h>
|
||||
#include <linux/bpf_insn.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bpf-devices.h"
|
||||
#include "bpf-program.h"
|
||||
#include "devnum-util.h"
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "recurse-dir.h"
|
||||
#include "rm-rf.h"
|
||||
#include "tmpfile-util.h"
|
||||
#include "user-util.h"
|
||||
|
||||
ExecSetCredential* exec_set_credential_free(ExecSetCredential *sc) {
|
||||
if (!sc)
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
#include "string-table.h"
|
||||
#include "strv.h"
|
||||
#include "terminal-util.h"
|
||||
#include "user-util.h"
|
||||
#include "utmp-wtmp.h"
|
||||
#include "vpick.h"
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "errno-util.h"
|
||||
#include "generator-setup.h"
|
||||
#include "macro.h"
|
||||
#include "mkdir-label.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "conf-files.h"
|
||||
#include "copy.h"
|
||||
#include "fd-util.h"
|
||||
@@ -8,6 +9,8 @@
|
||||
#include "log.h"
|
||||
#include "nulstr-util.h"
|
||||
#include "path-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
|
||||
#define IPE_SECFS_DIR "/sys/kernel/security/ipe"
|
||||
#define IPE_SECFS_NEW_POLICY IPE_SECFS_DIR "/new_policy"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <fnmatch.h>
|
||||
|
||||
#include "build.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "log.h"
|
||||
#include "os-util.h"
|
||||
#include "path-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "taint.h"
|
||||
#include "uid-range.h"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <errno.h>
|
||||
#include <fnmatch.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/prctl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "process-util.h"
|
||||
#include "stat-util.h"
|
||||
#include "string-table.h"
|
||||
#include "strv.h"
|
||||
#include "terminal-util.h"
|
||||
#include "tpm2-pcr.h"
|
||||
#include "tpm2-util.h"
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "devnum-util.h"
|
||||
#include "env-util.h"
|
||||
#include "escape.h"
|
||||
#include "extract-word.h"
|
||||
#include "fileio.h"
|
||||
#include "libfido2-util.h"
|
||||
#include "main-func.h"
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "cryptsetup-keyfile.h"
|
||||
#include "fileio.h"
|
||||
#include "log.h"
|
||||
#include "path-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
|
||||
int find_key_file(const char *key_file, char **search_path, const char *bindname, struct iovec *ret_key) {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <libcryptsetup.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "cryptsetup-token.h"
|
||||
#include "cryptsetup-token-util.h"
|
||||
#include "hexdecoct.h"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <errno.h>
|
||||
#include <libcryptsetup.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "cryptsetup-token.h"
|
||||
#include "cryptsetup-token-util.h"
|
||||
#include "hexdecoct.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <libcryptsetup.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "cryptsetup-token-util.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "json-util.h"
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "efi-loader.h"
|
||||
#include "env-util.h"
|
||||
#include "escape.h"
|
||||
#include "extract-word.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
#include "fstab-util.h"
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#include "build.h"
|
||||
#include "chase.h"
|
||||
#include "dirent-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "glyph-util.h"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "dissect-image.h"
|
||||
#include "env-util.h"
|
||||
#include "escape.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "format-table.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "sd-path.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "conf-files.h"
|
||||
#include "constants.h"
|
||||
#include "env-file.h"
|
||||
|
||||
@@ -5,10 +5,12 @@
|
||||
#include "sd-json.h"
|
||||
#include "sd-varlink.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "ansi-color.h"
|
||||
#include "build.h"
|
||||
#include "device-util.h"
|
||||
#include "efivars.h"
|
||||
#include "errno-util.h"
|
||||
#include "factory-reset.h"
|
||||
#include "fs-util.h"
|
||||
#include "json-util.h"
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "creds-util.h"
|
||||
#include "efi-loader.h"
|
||||
#include "env-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "fstab-util.h"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "sd-json.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bootspec.h"
|
||||
#include "env-util.h"
|
||||
#include "escape.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "alloc-util.h"
|
||||
#include "creds-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "generator.h"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <getopt.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "build.h"
|
||||
#include "devnum-util.h"
|
||||
#include "hibernate-resume-config.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "dns-domain.h"
|
||||
#include "fd-util.h"
|
||||
#include "home-util.h"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <fido.h>
|
||||
#endif
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "ask-password-api.h"
|
||||
#include "errno-util.h"
|
||||
#include "fido2-util.h"
|
||||
@@ -19,6 +20,7 @@
|
||||
#include "log.h"
|
||||
#include "memory-util.h"
|
||||
#include "random-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
|
||||
#if HAVE_LIBFIDO2
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "dirent-util.h"
|
||||
#include "dns-domain.h"
|
||||
#include "env-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "format-table.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "home-util.h"
|
||||
#include "homed-bus.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <linux/capability.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bus-common-errors.h"
|
||||
#include "bus-polkit.h"
|
||||
#include "fd-util.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "homed-operation.h"
|
||||
#include "log.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "homework-password-cache.h"
|
||||
#include "keyring-util.h"
|
||||
#include "log.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "homework-pkcs11.h"
|
||||
#include "log.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "sd-bus.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bus-common-errors.h"
|
||||
#include "bus-locator.h"
|
||||
#include "bus-util.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bus-common-errors.h"
|
||||
#include "errno-util.h"
|
||||
#include "home-util.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <openssl/pem.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "json-util.h"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "sd-json.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "home-util.h"
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
#include "sd-json.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "creds-util.h"
|
||||
#include "discover-image.h"
|
||||
#include "efivars.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "generator.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "alloc-util.h"
|
||||
#include "btrfs-util.h"
|
||||
#include "copy.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "btrfs-util.h"
|
||||
#include "copy.h"
|
||||
#include "curl-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "hostname-util.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "journal-compression-util.h"
|
||||
#include "parse-util.h"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user