summaryrefslogtreecommitdiff
path: root/src/nspawn
diff options
context:
space:
mode:
Diffstat (limited to 'src/nspawn')
-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 81c18073fd..f3a8593ec5 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -5519,8 +5519,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;
}