summaryrefslogtreecommitdiffstats
path: root/src/veritysetup/veritysetup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-03-31 11:01:52 +0200
committerLennart Poettering <lennart@poettering.net>2022-03-31 11:44:46 +0200
commitbb3ff7a9967db904c83f4f7be033f4d29ace4222 (patch)
tree54b3ab138c09cfd4d2b5e299fa7d2a7c5baa21ea /src/veritysetup/veritysetup.c
parentveritysetup: give command line parameters proper names (diff)
downloadsystemd-bb3ff7a9967db904c83f4f7be033f4d29ace4222.tar.xz
systemd-bb3ff7a9967db904c83f4f7be033f4d29ace4222.zip
veritysetup: mangle option strings like in cryptsetup
Diffstat (limited to 'src/veritysetup/veritysetup.c')
-rw-r--r--src/veritysetup/veritysetup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/veritysetup/veritysetup.c b/src/veritysetup/veritysetup.c
index 5fc74f1c31..3551ed4f3a 100644
--- a/src/veritysetup/veritysetup.c
+++ b/src/veritysetup/veritysetup.c
@@ -144,7 +144,7 @@ static int run(int argc, char *argv[]) {
data_device = argv[3];
verity_device = argv[4];
root_hash = argv[5];
- options = argv[6];
+ options = mangle_none(argc > 6 ? argv[6] : NULL);
r = unhexmem(root_hash, SIZE_MAX, &m, &l);
if (r < 0)
@@ -162,7 +162,7 @@ static int run(int argc, char *argv[]) {
return 0;
}
- if (argc > 6) {
+ if (options) {
r = parse_options(options);
if (r < 0)
return log_error_errno(r, "Failed to parse options: %m");