]> err.no Git - yubikey-personalization.old/commitdiff
Print the firmware version early.
authorRichard Levitte <levitte@lp.se>
Mon, 29 Jun 2009 19:47:57 +0000 (19:47 +0000)
committerRichard Levitte <levitte@lp.se>
Mon, 29 Jun 2009 19:47:57 +0000 (19:47 +0000)
Wrong configuration structure type.

ykpersonalize.c

index 662aed5a1fa20876d41a216502699774cc8778fc..1ac4229d9d3b6cfb1ce5820be70986723f29123b 100644 (file)
@@ -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);
        }