aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-01-13 12:55:08 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2017-03-11 15:41:38 +0100
commit185b318b9134da163bbfb160d2d737c835927f30 (patch)
tree45e334a1938ef118b5bbd69891d64f6c46c5a6e9
parentffcb53e4cb3419ea31bf7b22e5f0c42fd54041da (diff)
downloadlibnitrokey-185b318b9134da163bbfb160d2d737c835927f30.tar.gz
libnitrokey-185b318b9134da163bbfb160d2d737c835927f30.tar.bz2
Fix firmware version in device status
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--NitrokeyManager.cc2
-rw-r--r--include/stick20_commands.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc
index 37e35e5..d85af91 100644
--- a/NitrokeyManager.cc
+++ b/NitrokeyManager.cc
@@ -628,7 +628,7 @@ namespace nitrokey{
}
case DeviceModel::STORAGE:{
auto status = stick20::GetDeviceStatus::CommandTransaction::run(*device);
- return status.data().versionInfo.major;
+ return status.data().versionInfo.minor;
}
}
return 0;
diff --git a/include/stick20_commands.h b/include/stick20_commands.h
index 8080117..fd72f1e 100644
--- a/include/stick20_commands.h
+++ b/include/stick20_commands.h
@@ -130,9 +130,9 @@ namespace nitrokey {
uint8_t VersionInfo_au8[4];
struct {
uint8_t __unused;
- uint8_t major;
- uint8_t __unused2;
uint8_t minor;
+ uint8_t __unused2;
+ uint8_t major;
} __packed versionInfo;
};