aboutsummaryrefslogtreecommitdiff
path: root/pkg-config/src/lib.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2017-08-17 13:39:56 +0200
committerDaniel Mueller <deso@posteo.net>2017-08-17 13:39:56 +0200
commit8d4a7d0ec9c3a82c7546482875be80827e2be57a (patch)
tree9ba73c2f1557fb74b9f507d37be898bae9c86749 /pkg-config/src/lib.rs
parentac29709a644682c61a5a28d2a23f8887174fcc31 (diff)
downloadnitrocli-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 'pkg-config/src/lib.rs')
0 files changed, 0 insertions, 0 deletions