dfu: Use 0x0101 as an alias for 0x0110

If read the specification correctly it's supposed to be 0x0110 i.e. 1.10,
rather than 1.01 -- just work around it as it seems a common enough mistake.
This commit is contained in:
Richard Hughes 2017-10-11 10:57:17 +01:00
parent a1c7716cdc
commit 153374e014

View File

@ -307,6 +307,10 @@ dfu_device_parse_iface_data (DfuDevice *device, GBytes *iface_data)
priv->version == DFU_VERSION_DFU_1_1) {
g_debug ("basic DFU, no DfuSe support");
priv->dfuse_supported = FALSE;
} else if (priv->version == 0x0101) {
g_debug ("basic DFU 1.1 assumed, no DfuSe support");
priv->version = DFU_VERSION_DFU_1_1;
priv->dfuse_supported = FALSE;
} else if (priv->version == DFU_VERSION_DFUSE) {
g_debug ("DfuSe support");
priv->dfuse_supported = TRUE;