From 179f250b9a5583efc7d310eb3aed16e2adcbcfcc Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 10 Dec 2021 16:15:55 +0000 Subject: [PATCH] trivial: Properly namespace _INTERNAL_FLAG_NO_AUTO_REMOVE --- libfwupdplugin/fu-device.c | 4 ++-- libfwupdplugin/fu-device.h | 5 +++-- plugins/thunderbolt/fu-plugin-thunderbolt.c | 4 ++-- plugins/thunderbolt/fu-thunderbolt-device.c | 2 +- src/fu-udev-backend.c | 2 +- src/fu-usb-backend.c | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/libfwupdplugin/fu-device.c b/libfwupdplugin/fu-device.c index 06de48165..45f91ea13 100644 --- a/libfwupdplugin/fu-device.c +++ b/libfwupdplugin/fu-device.c @@ -230,7 +230,7 @@ fu_device_internal_flag_to_string(FuDeviceInternalFlags flag) return "use-parent-for-battery"; if (flag == FU_DEVICE_INTERNAL_FLAG_USE_PROXY_FALLBACK) return "use-proxy-fallback"; - if (flag == FWUPD_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE) + if (flag == FU_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE) return "no-auto-remove"; return NULL; } @@ -287,7 +287,7 @@ fu_device_internal_flag_from_string(const gchar *flag) if (g_strcmp0(flag, "use-proxy-fallback") == 0) return FU_DEVICE_INTERNAL_FLAG_USE_PROXY_FALLBACK; if (g_strcmp0(flag, "no-auto-remove") == 0) - return FWUPD_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE; + return FU_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE; return FU_DEVICE_INTERNAL_FLAG_UNKNOWN; } diff --git a/libfwupdplugin/fu-device.h b/libfwupdplugin/fu-device.h index bfdf4914b..78a88e74e 100644 --- a/libfwupdplugin/fu-device.h +++ b/libfwupdplugin/fu-device.h @@ -401,12 +401,13 @@ typedef guint64 FuDeviceInternalFlags; #define FU_DEVICE_INTERNAL_FLAG_USE_PROXY_FALLBACK (1ull << 18) /** - * FWUPD_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE : + * FU_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE: * * The device is not auto removed. + * * Since 1.7.3 */ -#define FWUPD_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE (1llu << 19) +#define FU_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE (1llu << 19) /* accessors */ gchar * diff --git a/plugins/thunderbolt/fu-plugin-thunderbolt.c b/plugins/thunderbolt/fu-plugin-thunderbolt.c index 03dbc7cdc..39b95396c 100644 --- a/plugins/thunderbolt/fu-plugin-thunderbolt.c +++ b/plugins/thunderbolt/fu-plugin-thunderbolt.c @@ -73,7 +73,7 @@ fu_plugin_thunderbolt_composite_prepare(FuPlugin *plugin, GPtrArray *devices, GE for (guint i = 0; i < devices->len; i++) { FuDevice *dev = g_ptr_array_index(devices, i); if ((g_strcmp0(fu_device_get_plugin(dev), "thunderbolt") == 0) && - fu_device_has_flag(dev, FWUPD_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE)) { + fu_device_has_internal_flag(dev, FU_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE)) { return fu_thunderbolt_probe_retimer(dev, error); } } @@ -86,7 +86,7 @@ fu_plugin_thunderbolt_composite_cleanup(FuPlugin *plugin, GPtrArray *devices, GE for (guint i = 0; i < devices->len; i++) { FuDevice *dev = g_ptr_array_index(devices, i); if ((g_strcmp0(fu_device_get_plugin(dev), "thunderbolt") == 0) && - fu_device_has_flag(dev, FWUPD_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE)) { + fu_device_has_internal_flag(dev, FU_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE)) { return fu_thunderbolt_device_close(dev, error); } } diff --git a/plugins/thunderbolt/fu-thunderbolt-device.c b/plugins/thunderbolt/fu-thunderbolt-device.c index 5a2258e1a..55df345a0 100644 --- a/plugins/thunderbolt/fu-thunderbolt-device.c +++ b/plugins/thunderbolt/fu-thunderbolt-device.c @@ -579,7 +579,7 @@ fu_thunderbolt_device_setup_retimer(FuDevice *device, GError **error) fu_device_add_flag(device, FWUPD_DEVICE_FLAG_UPDATABLE); fu_device_add_flag(device, FWUPD_DEVICE_FLAG_DUAL_IMAGE); fu_device_add_flag(device, FWUPD_DEVICE_FLAG_INTERNAL); - fu_device_add_flag(device, FWUPD_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE); + fu_device_add_internal_flag(device, FU_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE); vid = fu_udev_device_get_vendor(FU_UDEV_DEVICE(self)); if (vid == 0x0) { diff --git a/src/fu-udev-backend.c b/src/fu-udev-backend.c index fe9ce6eeb..a9b37a311 100644 --- a/src/fu-udev-backend.c +++ b/src/fu-udev-backend.c @@ -42,7 +42,7 @@ fu_udev_backend_device_remove(FuUdevBackend *self, GUdevDevice *udev_device) device_tmp = fu_backend_lookup_by_id(FU_BACKEND(self), g_udev_device_get_sysfs_path(udev_device)); if (device_tmp != NULL && - !fu_device_has_flag(device_tmp, FWUPD_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE)) { + !fu_device_has_internal_flag(device_tmp, FU_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE)) { if (g_getenv("FWUPD_PROBE_VERBOSE") != NULL) { g_debug("UDEV %s removed", g_udev_device_get_sysfs_path(udev_device)); } diff --git a/src/fu-usb-backend.c b/src/fu-usb-backend.c index b27913c57..6ff372953 100644 --- a/src/fu-usb-backend.c +++ b/src/fu-usb-backend.c @@ -40,7 +40,7 @@ fu_usb_backend_device_removed_cb(GUsbContext *ctx, GUsbDevice *usb_device, FuBac device_tmp = fu_backend_lookup_by_id(FU_BACKEND(self), g_usb_device_get_platform_id(usb_device)); if (device_tmp != NULL && - !fu_device_has_flag(device_tmp, FWUPD_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE)) + !fu_device_has_internal_flag(device_tmp, FU_DEVICE_INTERNAL_FLAG_NO_AUTO_REMOVE)) fu_backend_device_removed(backend, device_tmp); }