]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add missing '-v' in 'radmin' (#4189)
authorJorge Pereira <jpereira@users.noreply.github.com>
Wed, 18 Aug 2021 13:36:53 +0000 (10:36 -0300)
committerGitHub <noreply@github.com>
Wed, 18 Aug 2021 13:36:53 +0000 (08:36 -0500)
src/main/radmin.c

index 8edf163911552a406a2358979a3926378c93c412..d71a2dd0b465a2a976607404a07aef9d6ccd5174 100644 (file)
@@ -116,6 +116,7 @@ static void NEVER_RETURNS usage(int status)
        fprintf(output, "  -i input_file   Read commands from 'input_file'.\n");
        fprintf(output, "  -n name         Read raddb/name.conf instead of raddb/radiusd.conf\n");
        fprintf(output, "  -q              Quiet mode.\n");
+       fprintf(output, "  -v              Show program version information.\n");
 
        exit(status);
 }
@@ -367,7 +368,7 @@ int main(int argc, char **argv)
                progname++;
        }
 
-       while ((argval = getopt(argc, argv, "d:D:hi:e:Ef:n:qs:S")) != EOF) {
+       while ((argval = getopt(argc, argv, "d:D:hi:e:Ef:n:qs:vS")) != EOF) {
                switch (argval) {
                case 'd':
                        if (file) {
@@ -440,6 +441,11 @@ int main(int argc, char **argv)
                case 'S':
                        secret = NULL;
                        break;
+
+               case 'v':
+                       printf("%s\n", radmin_version);
+                       exit(EXIT_SUCCESS);
+                       break;
                }
        }