]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
volatile-root: fail if we can't parse specified parameter
authorLennart Poettering <lennart@poettering.net>
Wed, 19 Dec 2018 14:04:08 +0000 (15:04 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 1 Mar 2019 13:11:07 +0000 (14:11 +0100)
src/volatile-root/volatile-root.c

index 5c30da0de83a7f8268cad4d83a39f38dbdc47de3..d7f52e4a625f50b961117e98a22953ab3e429d12 100644 (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)