]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
integritysetup: also port to mangle_none()
authorLennart Poettering <lennart@poettering.net>
Thu, 31 Mar 2022 09:21:37 +0000 (11:21 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 31 Mar 2022 09:44:46 +0000 (11:44 +0200)
Let's make the tool work more like veritysetup/cryptsetup in this regard
too.

src/integritysetup/integritysetup.c

index 5fd220c515d49cccc8debe14002bfd6711e23209..f95840a8d0f3d1ec4ba8c9c915907b89a57164dd 100644 (file)
@@ -121,8 +121,8 @@ static int run(int argc, char *argv[]) {
                         return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "attach has a maximum of five arguments.");
 
                 device = argv[3];
-                key_file = (argc > 4) ? empty_or_dash_to_null(argv[4]) : NULL;
-                options = (argc > 5) ? empty_or_dash_to_null(argv[5]) : NULL;
+                key_file = mangle_none(argc > 4 ? argv[4] : NULL);
+                options = mangle_none(argc > 5 ? argv[5] : NULL);
 
                 if (key_file) {
                         r = load_key_file(key_file, &key_buf, &key_buf_size);