diff options
author | Richard Hughes <richard@hughsie.com> | 2015-10-18 20:47:16 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2015-10-18 20:56:46 +0100 |
commit | c60e682baffc86c6ed85b77960fe0a17d62f67ea (patch) | |
tree | 150251bac82b7d881028d444cef9bf6a761bca5d /data | |
parent | 16b4707618841eb884a861f2c65d8237cb83ed76 (diff) | |
download | appstream-glib-c60e682baffc86c6ed85b77960fe0a17d62f67ea.tar.gz |
Use a MS-style version number when parsing a hex version
If we're comparing versions that are both converted to strings it doesn't
really matter how the strings are stored (e.g. AA.BB.CC.DD or AA.BB.CCDD) as
the integer rules still apply **if** we don't remove the prefixed zeros.
The only time we have to be careful is where the firmware metainfo uses the
triplet and the .inf file uses the hex version format.
By using the triplet-style by default we match what Intel and Microsoft are
providing in the firmware release notes.
Basically:
* If you're not using the MS-style versioning scheme, just use hex numbers in
both places.
* If you don't care about applying the update on Microsoft Windows, just
don't supply an .inf file at all.
Fixes the other half of https://github.com/hughsie/fwupd/issues/34
This does break API, but we've never had the method in a released version so
I think it's fine to break at this stage. Make sure you update fwupd at the same
time if you're using git master.
The last bit of this fix would to be somehow encode the "display version" onto
the AppStream <release> object, but this needs discussion upstream first.
Diffstat (limited to 'data')
-rw-r--r-- | data/tests/firmware/2_0_0/firmware.inf | 2 | ||||
-rw-r--r-- | data/tests/firmware/2_0_1/firmware.inf | 2 | ||||
-rw-r--r-- | data/tests/firmware/2_0_2/firmware.inf | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/data/tests/firmware/2_0_0/firmware.inf b/data/tests/firmware/2_0_0/firmware.inf index af863bf..bf64f8b 100644 --- a/data/tests/firmware/2_0_0/firmware.inf +++ b/data/tests/firmware/2_0_0/firmware.inf @@ -12,7 +12,7 @@ firmware.bin [Firmware_AddReg] HKR,,FirmwareId,,{84f40464-9272-4ef7-9399-cd95f12da696} -HKR,,FirmwareVersion,%REG_DWORD%,0x20000 +HKR,,FirmwareVersion,%REG_DWORD%,0x2000000 HKR,,FirmwareFilename,,firmware.bin [Strings] diff --git a/data/tests/firmware/2_0_1/firmware.inf b/data/tests/firmware/2_0_1/firmware.inf index 41664ae..83b181d 100644 --- a/data/tests/firmware/2_0_1/firmware.inf +++ b/data/tests/firmware/2_0_1/firmware.inf @@ -11,7 +11,7 @@ firmware.bin [Firmware_AddReg] HKR,,FirmwareId,,{84f40464-9272-4ef7-9399-cd95f12da696} -HKR,,FirmwareVersion,%REG_DWORD%,0x20001 +HKR,,FirmwareVersion,%REG_DWORD%,0x2000001 HKR,,FirmwareFilename,,firmware.bin [Strings] diff --git a/data/tests/firmware/2_0_2/firmware.inf b/data/tests/firmware/2_0_2/firmware.inf index 1261c0a..e5807ce 100644 --- a/data/tests/firmware/2_0_2/firmware.inf +++ b/data/tests/firmware/2_0_2/firmware.inf @@ -11,7 +11,7 @@ firmware.bin [Firmware_AddReg] HKR,,FirmwareId,,{84f40464-9272-4ef7-9399-cd95f12da696} -HKR,,FirmwareVersion,%REG_DWORD%,0x00020002 +HKR,,FirmwareVersion,%REG_DWORD%,0x02000002 HKR,,FirmwareFilename,,firmware.bin [Strings] |