1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-06 13:17:44 +03:00

tree-wide: don't use mkdir_errno_wrapper() without reason

Simple mkdir() is fine, too, no need to use the wrapper
This commit is contained in:
Lennart Poettering 2021-11-12 15:16:19 +01:00
parent 3bb5ecaa88
commit 3f692e2ece
3 changed files with 5 additions and 5 deletions

View File

@ -1887,7 +1887,7 @@ int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t uid, gid
int r;
q = prefix_roota(root, path);
r = mkdir_errno_wrapper(q, mode);
r = RET_NERRNO(mkdir(q, mode));
if (r == -EEXIST)
return 0;
if (r < 0)
@ -2341,7 +2341,7 @@ static int setup_pts(const char *dest) {
/* Mount /dev/pts itself */
p = prefix_roota(dest, "/dev/pts");
r = mkdir_errno_wrapper(p, 0755);
r = RET_NERRNO(mkdir(p, 0755));
if (r < 0)
return log_error_errno(r, "Failed to create /dev/pts: %m");
@ -2666,7 +2666,7 @@ static int setup_journal(const char *directory) {
/* don't create parents here — if the host doesn't have
* permanent journal set up, don't force it here */
r = mkdir_errno_wrapper(p, 0755);
r = RET_NERRNO(mkdir(p, 0755));
if (r < 0 && r != -EEXIST) {
if (try) {
log_debug_errno(r, "Failed to create %s, skipping journal setup: %m", p);

View File

@ -292,7 +292,7 @@ int cg_create(const char *controller, const char *path) {
if (r < 0)
return r;
r = mkdir_errno_wrapper(fs, 0755);
r = RET_NERRNO(mkdir(fs, 0755));
if (r == -EEXIST)
return 0;
if (r < 0)

View File

@ -1933,7 +1933,7 @@ int run_udevd(int argc, char *argv[]) {
if (r < 0)
return r;
r = mkdir_errno_wrapper("/run/udev", 0755);
r = RET_NERRNO(mkdir("/run/udev", 0755));
if (r < 0 && r != -EEXIST)
return log_error_errno(r, "Failed to create /run/udev: %m");