Merge pull request #12119 from keszybz/voidify-mkdir-p

Voidify mkdir_p() and normalize util.h includes
This commit is contained in:
Lennart Poettering
2019-03-27 15:05:51 +01:00
committed by GitHub
167 changed files with 326 additions and 88 deletions
+1
View File
@@ -22,6 +22,7 @@
#include "string-util.h"
#include "strv.h"
#include "terminal-util.h"
#include "util.h"
static char** arg_listen = NULL;
static bool arg_accept = false;
+1
View File
@@ -8,6 +8,7 @@
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "sd-bus.h"
+4
View File
@@ -1,5 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "sd-device.h"
#include "alloc-util.h"
+2
View File
@@ -4,6 +4,8 @@
#include <errno.h>
#include <glob.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "dirent-util.h"
#include "glob-util.h"
+1
View File
@@ -5,6 +5,7 @@
#include <errno.h>
#include <net/if.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "alloc-util.h"
+1
View File
@@ -6,6 +6,7 @@
#include <sys/stat.h>
#include "alloc-util.h"
#include "format-util.h"
#include "fs-util.h"
#include "macro.h"
#include "mkdir.h"
+2
View File
@@ -1,11 +1,13 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <errno.h>
#include <fcntl.h>
#include <malloc.h>
#include <stddef.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/un.h>
#include <syslog.h>
+1
View File
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
#include <fcntl.h>
#include <stdbool.h>
#include <stddef.h>
#include <sys/stat.h>
+1 -1
View File
@@ -5,12 +5,12 @@
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include "alloc-util.h"
#include "extract-word.h"
#include "macro.h"
#include "string-util.h"
#include "util.h"
char *strv_find(char **l, const char *name) _pure_;
char *strv_find_prefix(char **l, const char *name) _pure_;
-22
View File
@@ -1,31 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
#include <alloca.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <limits.h>
#include <locale.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/inotify.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/statfs.h>
#include <sys/sysmacros.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include "format-util.h"
#include "macro.h"
#include "time-util.h"
static inline const char* yes_no(bool b) {
return b ? "yes" : "no";
+2 -1
View File
@@ -7,6 +7,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "alloc-util.h"
#include "conf-files.h"
@@ -20,7 +22,6 @@
#include "pretty-print.h"
#include "string-util.h"
#include "strv.h"
#include "util.h"
static bool arg_cat_config = false;
static PagerFlags arg_pager_flags = 0;
+1 -1
View File
@@ -759,7 +759,7 @@ static void automount_enter_running(Automount *a) {
return;
}
mkdir_p_label(a->where, a->directory_mode);
(void) mkdir_p_label(a->where, a->directory_mode);
/* Before we do anything, let's see if somebody is playing games with us? */
if (lstat(a->where, &st) < 0) {
+1
View File
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <stdio_ext.h>
#include <fcntl.h>
#include "alloc-util.h"
#include "async.h"
+3
View File
@@ -3,11 +3,14 @@
#include <grp.h>
#include <pwd.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "clean-ipc.h"
#include "dynamic-user.h"
#include "fd-util.h"
#include "fileio.h"
#include "format-util.h"
#include "fs-util.h"
#include "io-util.h"
#include "nscd-flush.h"
+1
View File
@@ -19,6 +19,7 @@ typedef struct Manager Manager;
#include "missing_resource.h"
#include "namespace.h"
#include "nsflags.h"
#include "time-util.h"
#define EXEC_STDIN_DATA_MAX (64U*1024U*1024U)
+3 -1
View File
@@ -5,6 +5,9 @@
***/
#include <errno.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "alloc-util.h"
@@ -12,7 +15,6 @@
#include "fileio.h"
#include "ima-setup.h"
#include "log.h"
#include "util.h"
#define IMA_SECFS_DIR "/sys/kernel/security/ima"
#define IMA_SECFS_POLICY IMA_SECFS_DIR "/policy"
+1
View File
@@ -8,6 +8,7 @@
#include "loopback-setup.h"
#include "missing.h"
#include "netlink-util.h"
#include "time-util.h"
#define LOOPBACK_SETUP_TIMEOUT_USEC (5 * USEC_PER_SEC)
+2 -2
View File
@@ -292,10 +292,10 @@ static int manager_check_ask_password(Manager *m) {
m->ask_password_inotify_fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC);
if (m->ask_password_inotify_fd < 0)
return log_error_errno(errno, "inotify_init1() failed: %m");
return log_error_errno(errno, "Failed to create inotify object: %m");
if (inotify_add_watch(m->ask_password_inotify_fd, "/run/systemd/ask-password", IN_CREATE|IN_DELETE|IN_MOVE) < 0) {
log_error_errno(errno, "Failed to add watch on /run/systemd/ask-password: %m");
log_error_errno(errno, "Failed to watch \"/run/systemd/ask-password\": %m");
manager_close_ask_password(m);
return -errno;
}
+1
View File
@@ -17,6 +17,7 @@
#include "alloc-util.h"
#include "audit-fd.h"
#include "bus-util.h"
#include "format-util.h"
#include "log.h"
#include "path-util.h"
#include "selinux-util.h"
+1
View File
@@ -13,6 +13,7 @@
#include "selinux-setup.h"
#include "selinux-util.h"
#include "string-util.h"
#include "time-util.h"
#include "util.h"
#if HAVE_SELINUX
+2
View File
@@ -2,6 +2,8 @@
#include <errno.h>
#include <signal.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "sd-messages.h"
+4
View File
@@ -1,5 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "alloc-util.h"
#include "fd-util.h"
#include "io-util.h"
+1
View File
@@ -12,6 +12,7 @@
#include <stdio_ext.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "alloc-util.h"
#include "dirent-util.h"
+4
View File
@@ -1,5 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include "alloc-util.h"
+3
View File
@@ -1,6 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <sys/statvfs.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "alloc-util.h"
#include "coredump-vacuum.h"
+1 -1
View File
@@ -369,7 +369,7 @@ static int save_external_coredump(
if (r < 0)
return log_error_errno(r, "Failed to determine coredump file name: %m");
mkdir_p_label("/var/lib/systemd/coredump", 0755);
(void) mkdir_p_label("/var/lib/systemd/coredump", 0755);
fd = open_tmpfile_linkable(fn, O_RDWR|O_CLOEXEC, &tmp);
if (fd < 0)
+2
View File
@@ -3,6 +3,8 @@
#include <dwarf.h>
#include <elfutils/libdwfl.h>
#include <stdio_ext.h>
#include <sys/types.h>
#include <unistd.h>
#include "alloc-util.h"
#include "fd-util.h"
+3
View File
@@ -1,7 +1,10 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <errno.h>
#include <fcntl.h>
#include <stdio_ext.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "alloc-util.h"
#include "dropin.h"
+3
View File
@@ -4,6 +4,9 @@
#include <mntent.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "sd-device.h"
+2 -1
View File
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <unistd.h>
#include "alloc-util.h"
#include "generator.h"
#include "mkdir.h"
@@ -9,7 +11,6 @@
#include "string-util.h"
#include "strv.h"
#include "unit-name.h"
#include "util.h"
static const char *arg_dest = NULL;
static char *arg_default_unit = NULL;
+4
View File
@@ -1,5 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "fuzz.h"
#include "sd-dhcp-server.c"
+1
View File
@@ -2,6 +2,7 @@
#include <linux/sockios.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include "fd-util.h"
#include "fuzz.h"
@@ -2,6 +2,7 @@
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include "alloc-util.h"
#include "fstab-util.h"
@@ -13,7 +14,6 @@
#include "special.h"
#include "string-util.h"
#include "unit-name.h"
#include "util.h"
static const char *arg_dest = "/tmp";
static char *arg_resume_device = NULL;
+2
View File
@@ -3,6 +3,8 @@
#include <errno.h>
#include <string.h>
#include <sys/utsname.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "alloc-util.h"
+2
View File
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <fcntl.h>
#include "alloc-util.h"
#include "build.h"
#include "curl-util.h"
+1
View File
@@ -7,6 +7,7 @@
#include "sd-event.h"
#include "hashmap.h"
#include "time-util.h"
typedef struct CurlGlue CurlGlue;
+1
View File
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <getopt.h>
#include <locale.h>
#include "sd-event.h"
#include "sd-id128.h"
+1
View File
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <getopt.h>
#include <locale.h>
#include "alloc-util.h"
#include "btrfs-util.h"
+1
View File
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <getopt.h>
#include <locale.h>
#include "sd-event.h"
#include "sd-id128.h"
+2
View File
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/xattr.h>
#include "alloc-util.h"
+1
View File
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <getopt.h>
#include <locale.h>
#include "sd-event.h"
#include "sd-id128.h"
+4 -1
View File
@@ -1,9 +1,12 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "fd-util.h"
#include "log.h"
#include "qcow2-util.h"
#include "util.h"
int main(int argc, char *argv[]) {
_cleanup_close_ int sfd = -1, dfd = -1;
+2
View File
@@ -4,6 +4,8 @@
#include <errno.h>
#include <stdio.h>
#include <sys/epoll.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "sd-bus.h"
+2
View File
@@ -5,6 +5,8 @@
#include <microhttpd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "sd-bus.h"
+2
View File
@@ -6,6 +6,8 @@
#include <stdio.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "sd-id128.h"
+1
View File
@@ -2,6 +2,7 @@
#pragma once
#include <stdbool.h>
#include <stdio.h>
#include "sd-id128.h"
+2
View File
@@ -4,6 +4,8 @@
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#if HAVE_XZ
+1
View File
@@ -11,6 +11,7 @@
#include "journal-def.h"
#include "journal-file.h"
#include "memory-util.h"
#include "time-util.h"
static uint64_t journal_file_tag_seqnum(JournalFile *f) {
uint64_t r;
+1 -1
View File
@@ -12,9 +12,9 @@
#include "hashmap.h"
#include "journal-def.h"
#include "macro.h"
#include "mmap-cache.h"
#include "sparse-endian.h"
#include "time-util.h"
typedef struct JournalMetrics {
/* For all these: -1 means "pick automatically", and 0 means "no limit enforced" */
+21 -22
View File
@@ -1901,6 +1901,21 @@ static int verify(sd_journal *j) {
return r;
}
static int watch_run_systemd_journal(uint32_t mask) {
_cleanup_close_ int watch_fd = -1;
(void) mkdir_p("/run/systemd/journal", 0755);
watch_fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC);
if (watch_fd < 0)
return log_error_errno(errno, "Failed to create inotify object: %m");
if (inotify_add_watch(watch_fd, "/run/systemd/journal", mask) < 0)
return log_error_errno(errno, "Failed to watch \"/run/systemd/journal\": %m");
return TAKE_FD(watch_fd);
}
static int flush_to_var(void) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
@@ -1934,19 +1949,13 @@ static int flush_to_var(void) {
if (r < 0)
return log_error_errno(r, "Failed to kill journal service: %s", bus_error_message(&error, r));
mkdir_p("/run/systemd/journal", 0755);
watch_fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC);
watch_fd = watch_run_systemd_journal(IN_CREATE|IN_DONT_FOLLOW|IN_ONLYDIR);
if (watch_fd < 0)
return log_error_errno(errno, "Failed to create inotify watch: %m");
r = inotify_add_watch(watch_fd, "/run/systemd/journal", IN_CREATE|IN_DONT_FOLLOW|IN_ONLYDIR);
if (r < 0)
return log_error_errno(errno, "Failed to watch journal directory: %m");
return watch_fd;
for (;;) {
if (access("/run/systemd/journal/flushed", F_OK) >= 0)
break;
return 0;
if (errno != ENOENT)
return log_error_errno(errno, "Failed to check for existence of /run/systemd/journal/flushed: %m");
@@ -1959,8 +1968,6 @@ static int flush_to_var(void) {
if (r < 0)
return log_error_errno(r, "Failed to flush inotify events: %m");
}
return 0;
}
static int send_signal_and_wait(int sig, const char *watch_path) {
@@ -2016,23 +2023,15 @@ static int send_signal_and_wait(int sig, const char *watch_path) {
/* Let's install the inotify watch, if we didn't do that yet. */
if (watch_fd < 0) {
mkdir_p("/run/systemd/journal", 0755);
watch_fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC);
watch_fd = watch_run_systemd_journal(IN_MOVED_TO|IN_DONT_FOLLOW|IN_ONLYDIR);
if (watch_fd < 0)
return log_error_errno(errno, "Failed to create inotify watch: %m");
r = inotify_add_watch(watch_fd, "/run/systemd/journal", IN_MOVED_TO|IN_DONT_FOLLOW|IN_ONLYDIR);
if (r < 0)
return log_error_errno(errno, "Failed to watch journal directory: %m");
return watch_fd;
/* Recheck the flag file immediately, so that we don't miss any event since the last check. */
continue;
}
/* OK, all preparatory steps done, let's wait until
* inotify reports an event. */
/* OK, all preparatory steps done, let's wait until inotify reports an event. */
r = fd_wait_for_event(watch_fd, POLLIN, USEC_INFINITY);
if (r < 0)
+2
View File
@@ -6,6 +6,8 @@
#include "sd-id128.h"
#include "time-util.h"
typedef struct ClientContext ClientContext;
#include "journald-server.h"
+1 -1
View File
@@ -9,7 +9,7 @@
#include "list.h"
#include "random-util.h"
#include "string-util.h"
#include "util.h"
#include "time-util.h"
#define POOLS_MAX 5
#define BUCKETS_MAX 127
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
#include "util.h"
#include "time-util.h"
typedef struct JournalRateLimit JournalRateLimit;
+1
View File
@@ -16,6 +16,7 @@ typedef struct Server Server;
#include "journald-stream.h"
#include "list.h"
#include "prioq.h"
#include "time-util.h"
typedef enum Storage {
STORAGE_AUTO,
+1 -1
View File
@@ -159,7 +159,7 @@ static int stdout_stream_save(StdoutStream *s) {
return log_oom();
}
mkdir_p("/run/systemd/journal/streams", 0755);
(void) mkdir_p("/run/systemd/journal/streams", 0755);
r = fopen_temporary(s->state_file, &f, &temp_path);
if (r < 0)
+2
View File
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <sys/stat.h>
#if HAVE_LZ4
#include <lz4.h>
#endif
+1
View File
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <fcntl.h>
#include <unistd.h>
#include "sd-journal.h"
@@ -11,7 +11,7 @@
#include "dhcp-internal.h"
#include "hashmap.h"
#include "log.h"
#include "util.h"
#include "time-util.h"
typedef struct DHCPClientId {
size_t length;
+1
View File
@@ -6,6 +6,7 @@
***/
#include "log.h"
#include "time-util.h"
#include "sd-ndisc.h"
+3
View File
@@ -9,6 +9,9 @@
#include <stdio_ext.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "sd-dhcp-lease.h"
+1 -1
View File
@@ -21,7 +21,7 @@
#include "random-util.h"
#include "siphash24.h"
#include "string-util.h"
#include "util.h"
#include "time-util.h"
/* Constants from the RFC */
#define PROBE_WAIT_USEC (1U * USEC_PER_SEC)
+1
View File
@@ -5,6 +5,7 @@
#include <netinet/icmp6.h>
#include <arpa/inet.h>
#include <unistd.h>
#include "sd-radv.h"
+1
View File
@@ -5,6 +5,7 @@
#include <netinet/icmp6.h>
#include <arpa/inet.h>
#include <unistd.h>
#include "sd-ndisc.h"
+3
View File
@@ -1,5 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <unistd.h>
#include <sys/types.h>
#include "bus-internal.h"
#include "bus-message.h"
#include "bus-signature.h"
+1 -1
View File
@@ -14,7 +14,7 @@
#include "list.h"
#include "prioq.h"
#include "socket-util.h"
#include "util.h"
#include "time-util.h"
/* Note that we use the new /run prefix here (instead of /var/run) since we require them to be aliases and
* that way we become independent of /var being mounted */
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <sys/wait.h>
#include <unistd.h>
#include "sd-bus.h"
@@ -1,5 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <fcntl.h>
#include <unistd.h>
#include "sd-device.h"
#include "alloc-util.h"
+1 -1
View File
@@ -6,7 +6,7 @@
#include "hashmap.h"
#include "string-util.h"
#include "tests.h"
#include "util.h"
#include "time-util.h"
static void test_sd_device_one(sd_device *d) {
const char *syspath, *subsystem, *val;
+1
View File
@@ -2,6 +2,7 @@
#include <ctype.h>
#include <stdio.h>
#include <sys/stat.h>
#include "alloc-util.h"
#include "conf-files.h"
+2
View File
@@ -10,6 +10,7 @@
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include "sd-hwdb.h"
@@ -20,6 +21,7 @@
#include "hwdb-util.h"
#include "nulstr-util.h"
#include "string-util.h"
#include "time-util.h"
struct sd_hwdb {
unsigned n_ref;
+1
View File
@@ -11,6 +11,7 @@
#include "log.h"
#include "string-util.h"
#include "strv.h"
#include "time-util.h"
#include "util.h"
static char* format_uids(char **buf, uid_t* uids, int count) {
@@ -8,6 +8,7 @@
#include "list.h"
#include "netlink-types.h"
#include "prioq.h"
#include "time-util.h"
#define RTNL_DEFAULT_TIMEOUT ((usec_t) (25 * USEC_PER_SEC))
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <stdio.h>
#include "af-list.h"
#include "alloc-util.h"
#include "in-addr-util.h"
+3 -2
View File
@@ -3,6 +3,8 @@
#include <errno.h>
#include <stdio_ext.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "bus-util.h"
@@ -420,8 +422,7 @@ int x11_write_data(Context *c) {
return 0;
}
mkdir_p_label("/etc/X11/xorg.conf.d", 0755);
(void) mkdir_p_label("/etc/X11/xorg.conf.d", 0755);
r = fopen_temporary("/etc/X11/xorg.conf.d/00-keyboard.conf", &f, &temp_path);
if (r < 0)
return r;
+2
View File
@@ -2,6 +2,8 @@
#include <errno.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#if HAVE_XKBCOMMON
+2 -2
View File
@@ -3,6 +3,7 @@
#include <errno.h>
#include <pwd.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include "sd-device.h"
@@ -1197,8 +1198,7 @@ static int method_set_user_linger(sd_bus_message *message, void *userdata, sd_bu
if (r == 0)
return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
mkdir_p_label("/var/lib/systemd", 0755);
(void) mkdir_p_label("/var/lib/systemd", 0755);
r = mkdir_safe_label("/var/lib/systemd/linger", 0755, 0, 0, MKDIR_WARN_MODE);
if (r < 0)
return r;
+2
View File
@@ -3,6 +3,8 @@
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "alloc-util.h"
+1
View File
@@ -4,6 +4,7 @@
#include <fcntl.h>
#include <stdio_ext.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include "sd-messages.h"
+1
View File
@@ -8,6 +8,7 @@
#include <stdio_ext.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <unistd.h>
#include "sd-messages.h"
+1
View File
@@ -11,6 +11,7 @@
#include "hashmap.h"
#include "list.h"
#include "set.h"
#include "time-util.h"
typedef struct Manager Manager;
+3 -1
View File
@@ -10,6 +10,9 @@
#include <security/pam_modules.h>
#include <security/pam_modutil.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "alloc-util.h"
#include "audit-util.h"
@@ -31,7 +34,6 @@
#include "stdio-util.h"
#include "strv.h"
#include "terminal-util.h"
#include "util.h"
static int parse_argv(
pam_handle_t *handle,
+1
View File
@@ -7,6 +7,7 @@
#include "bus-error.h"
#include "fs-util.h"
#include "format-util.h"
#include "label.h"
#include "main-func.h"
#include "mkdir.h"
+1
View File
@@ -4,6 +4,7 @@
#include <string.h>
#include <unistd.h>
#include <stdio_ext.h>
#include <sys/stat.h>
#include "sd-messages.h"
+1
View File
@@ -7,6 +7,7 @@ typedef enum KillWho KillWho;
#include "list.h"
#include "machined.h"
#include "operation.h"
#include "time-util.h"
typedef enum MachineState {
MACHINE_OPENING, /* Machine is being registered */
+2
View File
@@ -2,6 +2,8 @@
#include <errno.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "sd-daemon.h"
+1
View File
@@ -14,6 +14,7 @@
#include "escape.h"
#include "fd-util.h"
#include "fileio.h"
#include "format-util.h"
#include "fs-util.h"
#include "fstab-util.h"
#include "main-func.h"
+3
View File
@@ -4,6 +4,9 @@
#include <linux/if_addrlabel.h>
#include <net/if.h>
#include <stdbool.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "sd-device.h"
#include "sd-hwdb.h"
+1
View File
@@ -4,6 +4,7 @@
#include <linux/if.h>
#include <linux/fib_rules.h>
#include <stdio_ext.h>
#include <unistd.h>
#include "sd-daemon.h"
#include "sd-netlink.h"
+1
View File
@@ -2,6 +2,7 @@
#pragma once
#include "networkd-link.h"
#include "time-util.h"
typedef struct NDiscRDNSS {
usec_t valid_until;
+3
View File
@@ -1,5 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <sys/stat.h>
#include <sys/types.h>
#include "sd-daemon.h"
#include "sd-event.h"
+1
View File
@@ -7,6 +7,7 @@
#include "hashmap.h"
#include "network-util.h"
#include "time-util.h"
typedef struct Manager Manager;
typedef struct Link Link;
+2
View File
@@ -1,6 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <getopt.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "sd-daemon.h"
+1
View File
@@ -5,6 +5,7 @@
#include "alloc-util.h"
#include "fd-util.h"
#include "fileio.h"
#include "format-util.h"
#include "fs-util.h"
#include "mkdir.h"
#include "mount-util.h"
+1
View File
@@ -6,6 +6,7 @@
#include "alloc-util.h"
#include "escape.h"
#include "fd-util.h"
#include "format-util.h"
#include "fs-util.h"
#include "label.h"
#include "mkdir.h"
+1
View File
@@ -9,6 +9,7 @@
#include "cap-list.h"
#include "cpu-set-util.h"
#include "env-util.h"
#include "format-util.h"
#include "fs-util.h"
#include "hostname-util.h"
#include "json.h"
+1
View File
@@ -3,6 +3,7 @@
#include <errno.h>
#include <linux/netlink.h>
#include <sys/capability.h>
#include <sys/socket.h>
#include <sys/types.h>
#if HAVE_SECCOMP
+1
View File
@@ -17,6 +17,7 @@
#include "missing_resource.h"
#include "nspawn-expose-ports.h"
#include "nspawn-mount.h"
#include "time-util.h"
typedef enum StartMode {
START_PID1, /* Run parameters as command line as process 1 */
+1
View File
@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <fcntl.h>
#include <grp.h>
#include <sys/types.h>
#include <unistd.h>
+1
View File
@@ -10,6 +10,7 @@
#include "bus-common-errors.h"
#include "env-util.h"
#include "errno-util.h"
#include "format-util.h"
#include "hostname-util.h"
#include "in-addr-util.h"
#include "macro.h"
+2
View File
@@ -5,6 +5,8 @@
#include <nss.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include "sd-bus.h"

Some files were not shown because too many files have changed in this diff Show More