Fixing command-line option names in error messages

This commit is contained in:
Jaime Hablutzel 2021-05-21 12:28:04 -05:00 committed by Frank Morgner
parent 0b45e78e4f
commit 465375bda2
1 changed files with 4 additions and 4 deletions

View File

@ -866,14 +866,14 @@ int main(int argc, char * argv[])
break;
case OPT_SLOT_DESCRIPTION:
if (opt_slot_set) {
fprintf(stderr, "Error: Only one of --slot, --slot-label, --slot-index or --token-label can be used\n");
fprintf(stderr, "Error: Only one of --slot, --slot-description, --slot-index or --token-label can be used\n");
util_print_usage_and_die(app_name, options, option_help, NULL);
}
opt_slot_description = optarg;
break;
case OPT_SLOT_INDEX:
if (opt_slot_set || opt_slot_description) {
fprintf(stderr, "Error: Only one of --slot, --slot-label, --slot-index or --token-label can be used\n");
fprintf(stderr, "Error: Only one of --slot, --slot-description, --slot-index or --token-label can be used\n");
util_print_usage_and_die(app_name, options, option_help, NULL);
}
opt_slot_index = (CK_ULONG) strtoul(optarg, NULL, 0);
@ -885,7 +885,7 @@ int main(int argc, char * argv[])
break;
case OPT_TOKEN_LABEL:
if (opt_slot_set || opt_slot_description || opt_slot_index_set) {
fprintf(stderr, "Error: Only one of --slot, --slot-label, --slot-index or --token-label can be used\n");
fprintf(stderr, "Error: Only one of --slot, --slot-description, --slot-index or --token-label can be used\n");
util_print_usage_and_die(app_name, options, option_help, NULL);
}
opt_token_label = optarg;
@ -1133,7 +1133,7 @@ int main(int argc, char * argv[])
fprintf(stderr, "Using slot with index %lu (0x%lx)\n", opt_slot_index, opt_slot);
} else {
fprintf(stderr, "Slot with index %lu (counting from 0) is not available.\n", opt_slot_index);
fprintf(stderr, "You must specify a valid slot with either --slot, --slot-index or --slot-label.\n");
fprintf(stderr, "You must specify a valid slot with either --slot, --slot-description, --slot-index or --token-label.\n");
err = 1;
goto end;
}