]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
add parsing support for advertised force long opt
authorJamin W. Collins <jamin.collins@gmail.com>
Sat, 17 Oct 2020 16:18:30 +0000 (09:18 -0700)
committerJamin W. Collins <jamin.collins@gmail.com>
Sat, 17 Oct 2020 16:18:30 +0000 (09:18 -0700)
Existing help output advertises --force as a long opt.

  -f, --force                   delete group even if it is the primary group of a user

But errors when the long opt is used.

groupdel: unrecognized option '--force'

Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
src/groupdel.c

index f941a84ad43d8add2161b76a741f66631bcf1282..6a6c53390f8e1c713a6f0637fcec145787973a63 100644 (file)
@@ -323,6 +323,7 @@ static void process_flags (int argc, char **argv)
        int c;
        static struct option long_options[] = {
                {"help", no_argument,       NULL, 'h'},
+               {"force", no_argument,      NULL, 'f'},
                {"root", required_argument, NULL, 'R'},
                {"prefix", required_argument, NULL, 'P'},
                {NULL, 0, NULL, '\0'}