mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-21 17:32:04 +00:00
Include the device VID and PID in the calculation of the device-id
If we plug in USB device A, remove it, plug in USB device B and get the same autogenerated string all kinds of nasty things happen to the history database.
This commit is contained in:
parent
83e54e46ab
commit
1a24d9da90
@ -467,8 +467,12 @@ fu_device_set_platform_id (FuDevice *device, const gchar *platform_id)
|
||||
g_return_if_fail (platform_id != NULL);
|
||||
|
||||
/* automatically use this */
|
||||
if (fu_device_get_id (device) == NULL)
|
||||
fu_device_set_id (device, platform_id);
|
||||
if (fu_device_get_id (device) == NULL) {
|
||||
g_autofree gchar *id_guid = NULL;
|
||||
id_guid = g_strdup_printf ("%s:%s", platform_id,
|
||||
fu_device_get_guid_default (device));
|
||||
fu_device_set_id (device, id_guid);
|
||||
}
|
||||
fu_device_set_metadata (device, "platform-id", platform_id);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user