From: simon75j 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.0-1~24 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e51e22f7c28fe989641698930538bcdb4e34674;p=yubikey-personalization.old Exit with non-zero exit code on no yubikey present errors. Reported by Greg Woods. git-svn-id: https://yubikey-personalization.googlecode.com/svn/trunk@181 b62f149e-849f-11dd-9899-c7ba65f7c4c7 --- 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; }