From: Lennart Poettering Date: Wed, 19 Dec 2018 14:04:08 +0000 (+0100) Subject: volatile-root: fail if we can't parse specified parameter X-Git-Tag: v242-rc1~217^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26945d18acf1c40a5e4533b60023506c918331b6;p=thirdparty%2Fsystemd.git volatile-root: fail if we can't parse specified parameter --- diff --git a/src/volatile-root/volatile-root.c b/src/volatile-root/volatile-root.c index 5c30da0de83..d7f52e4a625 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)