summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nspawn/nspawn.c')
-rw-r--r--src/nspawn/nspawn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index e498dc59c6..5065c77fbb 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -5518,8 +5518,8 @@ static int run(int argc, char *argv[]) {
* two systems write to the same /var). Let's allow it for the special cases where /var is
* either copied (i.e. --ephemeral) or replaced (i.e. --volatile=yes|state). */
if (path_equal(arg_directory, "/") && !(arg_ephemeral || IN_SET(arg_volatile_mode, VOLATILE_YES, VOLATILE_STATE))) {
- log_error("Spawning container on root directory is not supported. Consider using --ephemeral, --volatile=yes or --volatile=state.");
- r = -EINVAL;
+ r = log_error_errno(SYNTHETIC_ERRNO(EINVAL),
+ "Spawning container on root directory is not supported. Consider using --ephemeral, --volatile=yes or --volatile=state.");
goto finish;
}