]> git.proxmox.com Git - fwupd.git/commitdiff
Return a more useful error if USB recovery() failed
authorRichard Hughes <richard@hughsie.com>
Thu, 8 Dec 2022 16:24:38 +0000 (16:24 +0000)
committerRichard Hughes <richard@hughsie.com>
Sun, 11 Dec 2022 20:25:36 +0000 (20:25 +0000)
libfwupdplugin/fu-device.c

index 5546f1b5b72eb9d5a2bd6331f27a14f1a9ef386a..66620ae1b5303257b7c362f9efd99ef3b436dc07 100644 (file)
@@ -681,10 +681,10 @@ fu_device_retry_full(FuDevice *self,
                                        if (!rec->recovery_func(self, user_data, error))
                                                return FALSE;
                                } else {
-                                       g_set_error(error,
-                                                   G_IO_ERROR,
-                                                   G_IO_ERROR_FAILED,
-                                                   "device recovery not possible");
+                                       g_propagate_prefixed_error(
+                                           error,
+                                           g_steal_pointer(&error_local),
+                                           "device recovery not possible: ");
                                        return FALSE;
                                }
                        }