From: levitte@gmail.com Date: Mon, 29 Jun 2009 19:47:57 +0000 (+0000) Subject: Print the firmware version early. X-Git-Tag: yubikey-personalisation_0.97-1~64 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a56b4f77c523dc8d59099c73f50efa59a06f3883;p=yubikey-personalization.old Print the firmware version early. Wrong configuration structure type. git-svn-id: https://yubikey-personalization.googlecode.com/svn/trunk@108 b62f149e-849f-11dd-9899-c7ba65f7c4c7 --- diff --git a/ykpersonalize.c b/ykpersonalize.c index 662aed5..1ac4229 100644 --- a/ykpersonalize.c +++ b/ykpersonalize.c @@ -105,7 +105,7 @@ main(int argc, char **argv) bool verbose = false; bool aesviahash = false; const char *aeshash = NULL; YK_KEY *yk = NULL; - YK_CONFIG *cfg = ykp_create_config(); + YKP_CONFIG *cfg = ykp_create_config(); YK_STATUS *st = ykds_alloc(); bool error = false; @@ -135,6 +135,17 @@ main(int argc, char **argv) goto err; } + printf("Firmware version %d.%d.%d Touch level %d ", + ykds_version_major(st), + ykds_version_minor(st), + ykds_version_build(st), + ykds_touch_level(st)); + if (ykds_pgm_seq(st)) + printf("Program sequence %d\n", + ykds_pgm_seq(st)); + else + printf("Unconfigured\n"); + if (ykp_configure_for(cfg, st)) goto err; @@ -334,17 +345,6 @@ main(int argc, char **argv) if (verbose) printf(" success\n"); - printf("Firmware version %d.%d.%d Touch level %d ", - ykds_version_major(st), - ykds_version_minor(st), - ykds_version_build(st), - ykds_touch_level(st)); - if (ykds_pgm_seq(st)) - printf("Program sequence %d\n", - ykds_pgm_seq(st)); - else - printf("Unconfigured\n"); - ykp_write_config(cfg, writer, stdout); }