From: levitte@gmail.com Date: Fri, 18 Sep 2009 12:04:23 +0000 (+0000) Subject: Better to handle -h after the core is initialised X-Git-Tag: yubikey-personalisation_1.1-1~2^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7826df093583bb26762b065efb4454f78de0e26a;p=yubikey-personalization Better to handle -h after the core is initialised git-svn-id: https://yubikey-personalization.googlecode.com/svn/trunk@210 b62f149e-849f-11dd-9899-c7ba65f7c4c7 --- diff --git a/ykpersonalize.c b/ykpersonalize.c index 46f9944..effd8d0 100644 --- a/ykpersonalize.c +++ b/ykpersonalize.c @@ -183,11 +183,6 @@ int main(int argc, char **argv) ykp_errno = 0; yk_errno = 0; - if (argc == 2 && strcmp (argv[1], "-h") == 0) { - fputs(usage, stderr); - goto err; - } - /* Assume the worst */ error = true; @@ -196,6 +191,11 @@ int main(int argc, char **argv) goto err; } + if (argc == 2 && strcmp (argv[1], "-h") == 0) { + fputs(usage, stderr); + goto err; + } + if (!(yk = yk_open_first_key())) { exit_code = 1; goto err;