]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/nspawn/nspawn-cgroup.c
coccinelle: make use of SYNTHETIC_ERRNO
[thirdparty/systemd.git] / src / nspawn / nspawn-cgroup.c
index 0a54d27e6a6a8588c58444ce2cf2080954a05f30..0197474dbc6f2ceb242808142b8f254130f74d92 100644 (file)
@@ -525,8 +525,8 @@ static int mount_unified_cgroups(const char *dest) {
                 if (errno != ENOENT)
                         return log_error_errno(errno, "Failed to determine if mount point %s contains the unified cgroup hierarchy: %m", p);
 
-                log_error("%s is already mounted but not a unified cgroup hierarchy. Refusing.", p);
-                return -EINVAL;
+                return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
+                                       "%s is already mounted but not a unified cgroup hierarchy. Refusing.", p);
         }
 
         return mount_verbose(LOG_ERR, "cgroup", p, "cgroup2", MS_NOSUID|MS_NOEXEC|MS_NODEV, NULL);