From: Richard Levitte Date: Mon, 29 Jun 2009 19:47:57 +0000 (+0000) Subject: Print the firmware version early. X-Git-Tag: yubikey-personalisation_1.3.5-1~4^2~129 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df842d38cab83e177b9844a9864b669d66594de0;p=yubikey-personalization.old Print the firmware version early. Wrong configuration structure type. --- 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); }