summaryrefslogtreecommitdiff
path: root/src/machine
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-12-15 17:08:13 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-12-16 13:28:22 +0100
commitdae8b82eb9ef391e0566ba69534b5a8f140d6c88 (patch)
tree1539e316d7bca62ac076b418b4a06296538fd994 /src/machine
parenta1b2c92d8290c76a29ccd0887a92ac064e1bb5a1 (diff)
downloadsystemd-dae8b82eb9ef391e0566ba69534b5a8f140d6c88.tar.gz
Add mkdir_errno_wrapper() and use instead of mkdir() in various places
We'd pass pointers to mkdir and mkdir_label to call in various places. mkdir returns the error in errno while mkdir_label returns the error directly.
Diffstat (limited to 'src/machine')
-rw-r--r--src/machine/machine-dbus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
index 3761267b57..2d3d285849 100644
--- a/src/machine/machine-dbus.c
+++ b/src/machine/machine-dbus.c
@@ -931,7 +931,7 @@ int bus_machine_method_bind_mount(sd_bus_message *message, void *userdata, sd_bu
/* Second, we mount the source file or directory to a directory inside of our MS_SLAVE playground. */
mount_tmp = strjoina(mount_slave, "/mount");
if (S_ISDIR(st.st_mode))
- r = mkdir(mount_tmp, 0700) < 0 ? -errno : 0;
+ r = mkdir_errno_wrapper(mount_tmp, 0700);
else
r = touch(mount_tmp);
if (r < 0) {