diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-12-12 16:58:24 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2018-02-23 15:42:37 +0100 |
commit | 809b618d4d064cedc7070cac5ccc8797e5d89f54 (patch) | |
tree | d2423759226e6f0a7d016ca2866acd03c35abbe7 /include/stick20_commands.h | |
parent | 0b0898f2b5d88738aa8f49ce6b9ba98db1c775f7 (diff) | |
download | libnitrokey-809b618d4d064cedc7070cac5ccc8797e5d89f54.tar.gz libnitrokey-809b618d4d064cedc7070cac5ccc8797e5d89f54.tar.bz2 |
Correct getting minor and major from firmware version
Add get_minor_firmware_version
Correct get_major_firmware version (was returning minor instead)
Name 3rd version field for test builds
Use minor firmware version in tests
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/stick20_commands.h')
-rw-r--r-- | include/stick20_commands.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/stick20_commands.h b/include/stick20_commands.h index f45283f..4b75e6a 100644 --- a/include/stick20_commands.h +++ b/include/stick20_commands.h @@ -168,10 +168,10 @@ namespace nitrokey { union{ uint8_t VersionInfo_au8[4]; struct { - uint8_t _reserved; + uint8_t major; uint8_t minor; uint8_t _reserved2; - uint8_t major; + uint8_t build_iteration; } __packed versionInfo; } __packed; @@ -215,8 +215,9 @@ namespace nitrokey { print_to_ss((int) ReadWriteFlagUncryptedVolume_u8 ); print_to_ss((int) ReadWriteFlagCryptedVolume_u8 ); print_to_ss((int) ReadWriteFlagHiddenVolume_u8 ); - print_to_ss((int) VersionInfo_au8[1] ); - print_to_ss((int) VersionInfo_au8[3] ); + print_to_ss((int) versionInfo.major ); + print_to_ss((int) versionInfo.minor ); + print_to_ss((int) versionInfo.build_iteration ); print_to_ss((int) FirmwareLocked_u8 ); print_to_ss((int) NewSDCardFound_u8 ); print_to_ss((int) NewSDCardFound_st.NewCard ); |