tree-wide: error handling modernizations
This commit is contained in:
committed by
Luca Boccassi
parent
8c7a6c742a
commit
1406bd66e4
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user