From: Simon Josefsson Date: Tue, 8 Sep 2009 08:43:00 +0000 (+0000) Subject: Exit with non-zero exit code on no yubikey present errors. X-Git-Tag: yubikey-personalisation_1.3.5-1~4^2~70 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7af0620d9c0663e0f8e56094c7538498207eea39;p=yubikey-personalization.old Exit with non-zero exit code on no yubikey present errors. Reported by Greg Woods. --- diff --git a/ykpersonalize.c b/ykpersonalize.c index 2576361..e90075e 100644 --- a/ykpersonalize.c +++ b/ykpersonalize.c @@ -181,13 +181,18 @@ main(int argc, char **argv) /* Assume the worst */ error = true; - if (!yk_init()) + if (!yk_init()) { + exit_code = 1; goto err; + } - if (!(yk = yk_open_first_key())) + if (!(yk = yk_open_first_key())) { + exit_code = 1; goto err; + } if (!yk_get_status(yk, st)) { + exit_code = 1; goto err; }