summaryrefslogtreecommitdiff
path: root/src/volatile-root
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-12-19 15:04:08 +0100
committerLennart Poettering <lennart@poettering.net>2019-03-01 14:11:07 +0100
commit26945d18acf1c40a5e4533b60023506c918331b6 (patch)
tree97c500fc7577a38b0db7e76feba3a08ff878c7cb /src/volatile-root
parent85fb5bb2cb074b75e79e348bb0ab2bdc0111de91 (diff)
downloadsystemd-26945d18acf1c40a5e4533b60023506c918331b6.tar.gz
volatile-root: fail if we can't parse specified parameter
Diffstat (limited to 'src/volatile-root')
-rw-r--r--src/volatile-root/volatile-root.c6
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)