mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-06 04:57:59 +00:00
Show a more detailed error when installing firmware on the wildcard
Based on a patch by Mario Limonciello, many thanks.
This commit is contained in:
parent
bd40528575
commit
c8646aff32
@ -846,6 +846,7 @@ static gboolean
|
|||||||
fu_main_update_helper (FuMainAuthHelper *helper, GError **error)
|
fu_main_update_helper (FuMainAuthHelper *helper, GError **error)
|
||||||
{
|
{
|
||||||
guint i;
|
guint i;
|
||||||
|
g_autoptr(GError) error_first = NULL;
|
||||||
|
|
||||||
/* load store file which also decompresses firmware */
|
/* load store file which also decompresses firmware */
|
||||||
fu_main_set_status (helper->priv, FWUPD_STATUS_DECOMPRESSING);
|
fu_main_set_status (helper->priv, FWUPD_STATUS_DECOMPRESSING);
|
||||||
@ -882,6 +883,10 @@ fu_main_update_helper (FuMainAuthHelper *helper, GError **error)
|
|||||||
g_debug ("failed to add %s: %s",
|
g_debug ("failed to add %s: %s",
|
||||||
fu_device_get_id (item->device),
|
fu_device_get_id (item->device),
|
||||||
error_local->message);
|
error_local->message);
|
||||||
|
|
||||||
|
/* save this for later */
|
||||||
|
if (error_first == NULL)
|
||||||
|
error_first = g_error_copy (error_local);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -891,11 +896,19 @@ fu_main_update_helper (FuMainAuthHelper *helper, GError **error)
|
|||||||
if (helper->devices->len == 0) {
|
if (helper->devices->len == 0) {
|
||||||
g_autofree gchar *guid = NULL;
|
g_autofree gchar *guid = NULL;
|
||||||
guid = fu_main_get_guids_from_store (helper->store);
|
guid = fu_main_get_guids_from_store (helper->store);
|
||||||
g_set_error (error,
|
if (error_first != NULL) {
|
||||||
FWUPD_ERROR,
|
g_set_error (error,
|
||||||
FWUPD_ERROR_INVALID_FILE,
|
FWUPD_ERROR,
|
||||||
"no attached hardware matched %s",
|
FWUPD_ERROR_INVALID_FILE,
|
||||||
guid);
|
"no attached hardware matched %s: %s",
|
||||||
|
guid, error_first->message);
|
||||||
|
} else {
|
||||||
|
g_set_error (error,
|
||||||
|
FWUPD_ERROR,
|
||||||
|
FWUPD_ERROR_INVALID_FILE,
|
||||||
|
"no attached hardware matched %s",
|
||||||
|
guid);
|
||||||
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user