From 6e51e22f7c28fe989641698930538bcdb4e34674 Mon Sep 17 00:00:00 2001 From: simon75j Date: Tue, 8 Sep 2009 08:43:00 +0000 Subject: [PATCH] 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 --- ykpersonalize.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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; } -- 2.39.5