]> Git repositories of Nishi - rbuild.git/commitdiff
add help
authorNishi <nishi@nishi.boats>
Fri, 11 Oct 2024 20:17:47 +0000 (20:17 +0000)
committerNishi <nishi@nishi.boats>
Fri, 11 Oct 2024 20:17:47 +0000 (20:17 +0000)
git-svn-id: file:///raid/svn-personal/rbuild/trunk@12 c68d3453-7f82-0740-9748-1d72386a946b

Server/main.c

index b41bb4c73486b6bd9524658e8c1054384a648808..52f81703b208cc5456879ffa24286488d4e4ec0a 100644 (file)
@@ -42,6 +42,11 @@ int main(int argc, char** argv) {
                                printf("\tPlain : %s\n", rbs_plain_auth);
                                printf("\tPAM   : %s\n", rbs_pam_auth);
                                return 0;
+                       } else if(strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "-h") == 0) {
+                               printf("Usage: %s --config|-C config [--inetd|-i] [--dry-run|-d]\n", argv[0]);
+                               printf("Usage: %s --version|-V\n", argv[0]);
+                               printf("Usage: %s --help|-h\n", argv[0]);
+                               return 0;
                        } else {
                                fprintf(stderr, "Unknown option: %s\n", argv[i]);
                                return 1;