mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
Voidify more mkdir_p calls
This commit is contained in:
parent
ca78ad1de9
commit
6e5dcce4b1
src
core
coredump
journal
locale
login
shared
@ -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) {
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -422,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;
|
||||
|
@ -1198,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;
|
||||
|
@ -1032,7 +1032,7 @@ int image_path_lock(const char *path, int operation, LockFile *global, LockFile
|
||||
}
|
||||
|
||||
if (p) {
|
||||
mkdir_p("/run/systemd/nspawn/locks", 0700);
|
||||
(void) mkdir_p("/run/systemd/nspawn/locks", 0700);
|
||||
|
||||
r = make_lock_file(p, operation, global);
|
||||
if (r < 0) {
|
||||
@ -1169,8 +1169,6 @@ int image_read_metadata(Image *i) {
|
||||
}
|
||||
|
||||
int image_name_lock(const char *name, int operation, LockFile *ret) {
|
||||
const char *p;
|
||||
|
||||
assert(name);
|
||||
assert(ret);
|
||||
|
||||
@ -1187,9 +1185,8 @@ int image_name_lock(const char *name, int operation, LockFile *ret) {
|
||||
if (streq(name, ".host"))
|
||||
return -EBUSY;
|
||||
|
||||
mkdir_p("/run/systemd/nspawn/locks", 0700);
|
||||
p = strjoina("/run/systemd/nspawn/locks/name-", name);
|
||||
|
||||
const char *p = strjoina("/run/systemd/nspawn/locks/name-", name);
|
||||
(void) mkdir_p("/run/systemd/nspawn/locks", 0700);
|
||||
return make_lock_file(p, operation, ret);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user