Fixed error when parameters in unblock-pin

when unblock-pin action is called without -P and -N parameter, the wrong
error is returned, saying that -P should be a pin, whereas in this
action it is a puk.
This commit is contained in:
Thomas Westfeld
2015-01-18 22:35:35 +01:00
parent f69a4ff8f6
commit 1b4ad6b8bd
+3 -2
View File
@@ -1358,9 +1358,10 @@ int main(int argc, char *argv[]) {
ret = EXIT_FAILURE; ret = EXIT_FAILURE;
} }
} else { } else {
fprintf(stderr, "The %s action needs a pin (-P) and a new-pin (-N).\n", fprintf(stderr, "The %s action needs a %s (-P) and a new-pin (-N).\n",
action == action_arg_changeMINUS_pin ? "change-pin" : action == action_arg_changeMINUS_pin ? "change-pin" :
action == action_arg_changeMINUS_puk ? "change-puk" : "unblock-pin"); action == action_arg_changeMINUS_puk ? "change-puk" : "unblock-pin",
action == action_arg_unblockMINUS_pin ? "puk" : "pin");
ret = EXIT_FAILURE; ret = EXIT_FAILURE;
} }
break; break;