From 43742bcd3bd014adeec103a7645dcdb2a2adeba6 Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Tue, 3 Sep 2019 23:36:01 -0500 Subject: [PATCH] trivial: dell: show reasons for lack of updates in `UpdateError` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` └─XPS 13 7390 TPM 2.0: Device ID: c56e9f77cfee65151bdef90310776f9d62827f5a Summary: Platform TPM device Current version: 7.2.1.0 Vendor: Dell Inc. Update Error: Updating disabled due to TPM owernship Flags: internal|require-ac|registered ``` --- plugins/dell/fu-plugin-dell.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/dell/fu-plugin-dell.c b/plugins/dell/fu-plugin-dell.c index 0603576c2..0c5c314ab 100644 --- a/plugins/dell/fu-plugin-dell.c +++ b/plugins/dell/fu-plugin-dell.c @@ -637,8 +637,8 @@ fu_plugin_dell_detect_tpm (FuPlugin *plugin, GError **error) } fu_device_set_flashes_left (dev, out->flashes_left); } else { - g_debug ("%s updating disabled due to TPM ownership", - pretty_tpm_name); + fu_device_set_update_error (dev, + "Updating disabled due to TPM ownership"); } fu_plugin_device_register (plugin, dev); @@ -666,8 +666,7 @@ fu_plugin_dell_detect_tpm (FuPlugin *plugin, GError **error) if ((out->status & TPM_OWN_MASK) == 0 && out->flashes_left > 0) { fu_device_set_flashes_left (dev_alt, out->flashes_left); } else { - g_debug ("%s mode switch disabled due to TPM ownership", - pretty_tpm_name); + fu_device_set_update_error (dev_alt, "mode switch disabled due to TPM ownership"); } fu_plugin_device_register (plugin, dev_alt); }