diff options
author | Daniel Mueller <deso@posteo.net> | 2017-08-17 13:39:56 +0200 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2017-08-17 13:39:56 +0200 |
commit | 8d4a7d0ec9c3a82c7546482875be80827e2be57a (patch) | |
tree | 9ba73c2f1557fb74b9f507d37be898bae9c86749 /libc/src/unix/uclibc/x86_64/mod.rs | |
parent | ac29709a644682c61a5a28d2a23f8887174fcc31 (diff) | |
download | nitrocli-8d4a7d0ec9c3a82c7546482875be80827e2be57a.tar.gz nitrocli-8d4a7d0ec9c3a82c7546482875be80827e2be57a.tar.bz2 |
Fix display of firmware version
The nitrokey-storage-firmware package defines an array of four byte
values to hold information about the firmware version. libnitrokey uses
a similar definition but overlays it with some more semantically
meaningful information by putting it into a union:
union {
uint8_t VersionInfo_au8[4];
struct {
uint8_t __unused;
uint8_t major;
uint8_t __unused2;
uint8_t minor;
} versionInfo;
};
In order to derive the firmware version representation for nitrocli we
used the same major/minor version definition as libnitrokey. This
definition, however, is wrong or at least not in line with how the
firmware is versioned officially.
This change reworks the way we interpret the version information
reported by the Nitrokey Storage device. Like the firmware, we treat the
first byte as the major version and the second one as the minor version.
The remaining two bytes seem to represent the build number and an
internal version according to usage of those fields in
nitrokey-storage-firmware but we ignore both to keep the reported string
similar to that of the nitrokey-app.
Diffstat (limited to 'libc/src/unix/uclibc/x86_64/mod.rs')
0 files changed, 0 insertions, 0 deletions