From 26945d18acf1c40a5e4533b60023506c918331b6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 19 Dec 2018 15:04:08 +0100 Subject: [PATCH] volatile-root: fail if we can't parse specified parameter --- src/volatile-root/volatile-root.c | 6 ++---- 1 file 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)