mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-09 09:55:39 +00:00
trivial: fu-tool: correct a reference to wrong device ID when using GUID
When finding the device by GUID we need to do a lookup first.
This commit is contained in:
parent
aac9c74ec6
commit
9917bb44bc
@ -1079,19 +1079,19 @@ fu_util_update_all (FuUtilPrivate *priv, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_util_update_by_id (FuUtilPrivate *priv, const gchar *device_id, GError **error)
|
fu_util_update_by_id (FuUtilPrivate *priv, const gchar *id, GError **error)
|
||||||
{
|
{
|
||||||
FwupdRelease *rel;
|
FwupdRelease *rel;
|
||||||
g_autoptr(FuDevice) dev = NULL;
|
g_autoptr(FuDevice) dev = NULL;
|
||||||
g_autoptr(GPtrArray) rels = NULL;
|
g_autoptr(GPtrArray) rels = NULL;
|
||||||
|
|
||||||
/* do not allow a partial device-id */
|
/* do not allow a partial device-id, lookup GUIDs */
|
||||||
dev = fu_util_get_device (priv, device_id, error);
|
dev = fu_util_get_device (priv, id, error);
|
||||||
if (dev == NULL)
|
if (dev == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* get the releases for this device and filter for validity */
|
/* get the releases for this device and filter for validity */
|
||||||
rels = fu_engine_get_upgrades (priv->engine, device_id, error);
|
rels = fu_engine_get_upgrades (priv->engine, fu_device_get_id (dev), error);
|
||||||
if (rels == NULL)
|
if (rels == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
rel = g_ptr_array_index (rels, 0);
|
rel = g_ptr_array_index (rels, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user