volatile-root: fail if we can't parse specified parameter

This commit is contained in:
Lennart Poettering 2018-12-19 15:04:08 +01:00
parent 85fb5bb2cb
commit 26945d18ac
1 changed files with 2 additions and 4 deletions

View File

@ -96,10 +96,8 @@ static int run(int argc, char *argv[]) {
if (r == 0 && argc >= 2) {
/* The kernel command line always wins. However if nothing was set there, the argument passed here wins instead. */
m = volatile_mode_from_string(argv[1]);
if (m < 0) {
log_error("Couldn't parse volatile mode: %s", argv[1]);
r = -EINVAL;
}
if (m < 0)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Couldn't parse volatile mode: %s", argv[1]);
}
if (argc < 3)