From 0dcb3aadfe951d3ecbd6ad27e9eeb8822ab2f579 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 20 Feb 2023 11:20:09 +0000 Subject: [PATCH] intel-usb4: Implement FuDevice->set_progress() to avoid a warning --- plugins/intel-usb4/fu-intel-usb4-device.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/intel-usb4/fu-intel-usb4-device.c b/plugins/intel-usb4/fu-intel-usb4-device.c index f4b81734d..1f5bac834 100644 --- a/plugins/intel-usb4/fu-intel-usb4-device.c +++ b/plugins/intel-usb4/fu-intel-usb4-device.c @@ -545,6 +545,16 @@ fu_intel_usb4_device_to_string(FuDevice *device, guint idt, GString *str) fu_string_append_kx(str, idt, "NvmDeviceId", self->nvm_device_id); } +static void +fu_thunderbolt_device_set_progress(FuDevice *self, FuProgress *progress) +{ + fu_progress_set_id(progress, G_STRLOC); + fu_progress_add_step(progress, FWUPD_STATUS_DEVICE_RESTART, 0, "detach"); + fu_progress_add_step(progress, FWUPD_STATUS_DEVICE_WRITE, 78, "write"); + fu_progress_add_step(progress, FWUPD_STATUS_DEVICE_RESTART, 22, "attach"); + fu_progress_add_step(progress, FWUPD_STATUS_DEVICE_BUSY, 0, "reload"); +} + static void fu_intel_usb4_device_init(FuIntelUsb4Device *self) { @@ -566,4 +576,5 @@ fu_intel_usb4_device_class_init(FuIntelUsb4DeviceClass *klass) klass_device->prepare_firmware = fu_intel_usb4_device_prepare_firmware; klass_device->write_firmware = fu_intel_usb4_device_write_firmware; klass_device->activate = fu_intel_usb4_device_activate; + klass_device->set_progress = fu_thunderbolt_device_set_progress; } -- 2.39.5