mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-27 07:52:24 +00:00
Record the UEFI failure in more cases
Ensure the historical error is set for failed NEEDS_REBOOT UEFI devices that do not set LastAttemptStatus.
This commit is contained in:
parent
7f7f0aed1f
commit
e261bb6fa0
@ -5740,6 +5740,7 @@ fu_engine_update_history_device (FuEngine *self, FuDevice *dev_history, GError *
|
|||||||
fu_device_set_version (dev_history, fu_device_get_version (dev));
|
fu_device_set_version (dev_history, fu_device_get_version (dev));
|
||||||
fu_device_remove_flag (dev_history, FWUPD_DEVICE_FLAG_NEEDS_ACTIVATION);
|
fu_device_remove_flag (dev_history, FWUPD_DEVICE_FLAG_NEEDS_ACTIVATION);
|
||||||
fu_device_set_update_state (dev_history, FWUPD_UPDATE_STATE_SUCCESS);
|
fu_device_set_update_state (dev_history, FWUPD_UPDATE_STATE_SUCCESS);
|
||||||
|
fu_device_set_update_error (dev_history, NULL);
|
||||||
return fu_history_modify_device (self->history, dev_history, error);
|
return fu_history_modify_device (self->history, dev_history, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5756,11 +5757,14 @@ fu_engine_update_history_device (FuEngine *self, FuDevice *dev_history, GError *
|
|||||||
if (fu_device_get_update_state (dev) != FWUPD_UPDATE_STATE_FAILED &&
|
if (fu_device_get_update_state (dev) != FWUPD_UPDATE_STATE_FAILED &&
|
||||||
fu_device_get_update_state (dev) != FWUPD_UPDATE_STATE_FAILED_TRANSIENT) {
|
fu_device_get_update_state (dev) != FWUPD_UPDATE_STATE_FAILED_TRANSIENT) {
|
||||||
g_debug ("falling back to generic failure");
|
g_debug ("falling back to generic failure");
|
||||||
|
fu_device_set_update_state (dev_history, FWUPD_UPDATE_STATE_FAILED);
|
||||||
fu_device_set_update_error (dev_history, "failed to run update on reboot");
|
fu_device_set_update_error (dev_history, "failed to run update on reboot");
|
||||||
|
} else {
|
||||||
|
fu_device_set_update_state (dev_history, fu_device_get_update_state (dev));
|
||||||
|
fu_device_set_update_error (dev_history, fu_device_get_update_error (dev));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update the state in the database */
|
/* update the state in the database */
|
||||||
fu_device_set_update_error (dev_history, fu_device_get_update_error (dev));
|
|
||||||
return fu_history_modify_device (self->history, dev_history, error);
|
return fu_history_modify_device (self->history, dev_history, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user