mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-09 05:37:44 +00:00
fu-util: Only show UpdateMessage when state is success
This will show it only when an update was sucessful. Fixes: #2212
This commit is contained in:
parent
28d51c036b
commit
c2721c8695
@ -1210,17 +1210,20 @@ fu_util_device_to_string (FwupdDevice *dev, guint idt)
|
|||||||
/* TRANSLATORS: hardware state, e.g. "pending" */
|
/* TRANSLATORS: hardware state, e.g. "pending" */
|
||||||
fu_common_string_append_kv (str, idt + 1, _("Update State"),
|
fu_common_string_append_kv (str, idt + 1, _("Update State"),
|
||||||
fwupd_update_state_to_string (state));
|
fwupd_update_state_to_string (state));
|
||||||
|
|
||||||
|
if (state == FWUPD_UPDATE_STATE_SUCCESS) {
|
||||||
|
tmp = fwupd_device_get_update_message (dev);
|
||||||
|
if (tmp != NULL) {
|
||||||
|
/* TRANSLATORS: helpful messages from last update */
|
||||||
|
fu_common_string_append_kv (str, idt + 1, _("Update Message"), tmp);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
tmp = fwupd_device_get_update_error (dev);
|
tmp = fwupd_device_get_update_error (dev);
|
||||||
if (tmp != NULL) {
|
if (tmp != NULL) {
|
||||||
/* TRANSLATORS: error message from last update attempt */
|
/* TRANSLATORS: error message from last update attempt */
|
||||||
fu_common_string_append_kv (str, idt + 1, _("Update Error"), tmp);
|
fu_common_string_append_kv (str, idt + 1, _("Update Error"), tmp);
|
||||||
}
|
}
|
||||||
tmp = fwupd_device_get_update_message (dev);
|
|
||||||
if (tmp != NULL) {
|
|
||||||
/* TRANSLATORS: helpful messages from last update */
|
|
||||||
fu_common_string_append_kv (str, idt + 1, _("Update Message"), tmp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* modified date: for history devices */
|
/* modified date: for history devices */
|
||||||
if (modified > 0) {
|
if (modified > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user