]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
portablectl: support 'help' parameter on --copy=
authorLennart Poettering <lennart@poettering.net>
Thu, 31 May 2018 10:06:12 +0000 (12:06 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 31 May 2018 10:06:12 +0000 (12:06 +0200)
src/portable/portablectl.c

index 5c56bce2b878cbb5d731a13226d35ad8b3391640..04a261297ce1c11e4f906e1c79f6d6f8ed8c6aa8 100644 (file)
@@ -900,7 +900,12 @@ static int parse_argv(int argc, char *argv[]) {
                                 arg_copy_mode = NULL;
                         else if (STR_IN_SET(optarg, "copy", "symlink"))
                                 arg_copy_mode = optarg;
-                        else {
+                        else if (streq(optarg, "help")) {
+                                puts("auto\n"
+                                     "copy\n"
+                                     "symlink");
+                                return 0;
+                        } else {
                                 log_error("Failed to parse --copy= argument: %s", optarg);
                                 return -EINVAL;
                         }