add action for what to do

This commit is contained in:
Klas Lindfors
2014-02-03 15:29:44 +01:00
parent 8fff971bfd
commit ecffbe953c
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -27,3 +27,4 @@
option "verbose" v "Print more information" flag off option "verbose" v "Print more information" flag off
option "reader" r "Only use a matching reader" string optional option "reader" r "Only use a matching reader" string optional
option "key" k "Authentication key to use" string optional default="010203040506070801020304050607080102030405060708" option "key" k "Authentication key to use" string optional default="010203040506070801020304050607080102030405060708"
option "action" a "Action to take" values="version" enum
+2
View File
@@ -318,7 +318,9 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE; return EXIT_FAILURE;
} }
if(args_info.action_arg == action_arg_version) {
print_version(&card, args_info.verbose_flag); print_version(&card, args_info.verbose_flag);
}
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }