chiark / gitweb /
nspawn: correct EEXIST check when creating directory to mount /tmp in
authorLennart Poettering <lennart@poettering.net>
Wed, 3 Dec 2014 16:52:51 +0000 (17:52 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 3 Dec 2014 16:53:33 +0000 (17:53 +0100)
https://bugs.freedesktop.org/show_bug.cgi?id=86309

src/nspawn/nspawn.c

index fed150e..48ef7d0 100644 (file)
@@ -808,8 +808,8 @@ static int mount_tmpfs(const char *dest) {
                         return log_oom();
 
                 r = mkdir_label(where, 0755);
-                if (r < 0 && errno != EEXIST)
-                        return log_error_errno(r, "creating mount point for tmpfs %s failed: %m", where);
+                if (r < 0 && r != -EEXIST)
+                        return log_error_errno(r, "Creating mount point for tmpfs %s failed: %m", where);
 
                 if (mount("tmpfs", where, "tmpfs", MS_NODEV|MS_STRICTATIME, *o) < 0)
                         return log_error_errno(errno, "tmpfs mount to %s failed: %m", where);