summaryrefslogtreecommitdiff
path: root/src/nspawn
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-03-01 09:37:41 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2023-03-01 22:52:55 +0000
commit1406bd66e4dbb5dd0130d9327ffd588652cbe228 (patch)
tree07e98957ce839227aa8a386c3596a7f9f121d3a3 /src/nspawn
parent8c7a6c742afef9284d5c06fc285cf66306cbce31 (diff)
downloadsystemd-1406bd66e4dbb5dd0130d9327ffd588652cbe228.tar.gz
tree-wide: error handling modernizations
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 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;
}