diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-12-19 15:04:08 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-03-01 14:11:07 +0100 |
commit | 26945d18acf1c40a5e4533b60023506c918331b6 (patch) | |
tree | 97c500fc7577a38b0db7e76feba3a08ff878c7cb /src/volatile-root | |
parent | volatile-root: add missing logging to volatile-root (diff) | |
download | systemd-26945d18acf1c40a5e4533b60023506c918331b6.tar.xz systemd-26945d18acf1c40a5e4533b60023506c918331b6.zip |
volatile-root: fail if we can't parse specified parameter
Diffstat (limited to 'src/volatile-root')
-rw-r--r-- | src/volatile-root/volatile-root.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/volatile-root/volatile-root.c b/src/volatile-root/volatile-root.c index 5c30da0de8..d7f52e4a62 100644 --- a/src/volatile-root/volatile-root.c +++ b/src/volatile-root/volatile-root.c @@ -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) |