Skip to content

Commit

Permalink
Support to help options (h, ?)
Browse files Browse the repository at this point in the history
  • Loading branch information
dyorgio authored Dec 12, 2020
1 parent f567a55 commit f7e6116
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions clone_checker.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@ int main(int args_count, char **args) {
bool is_forced_mode = false;
bool is_quick_mode = false;
int opt;
while ( (opt = getopt(args_count, args, "fqv")) != -1) {
while ( (opt = getopt(args_count, args, "fqv?h")) != -1) {
switch ( opt ) {
case 'f': is_forced_mode = true; break;
case 'q': is_quick_mode = true; break;
case 'v': fprintf(stderr, "APFS Clone Checker - Version: 2020-12-12\n"); exit(EXIT_SUCCESS); break;
case 'v': fprintf(stderr, "APFS Clone Checker - Version: 1.0.0.0\n"); exit(EXIT_SUCCESS); break;
case '?':
case 'h': printUsage(args[0]);
default:
printUsage(args[0]);
}
}
}
if ( args_count - optind < 2 ) {
printUsage(args[0]);
}
Expand Down

0 comments on commit f7e6116

Please sign in to comment.