mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-15 15:03:48 +00:00
trivial: Properly namespace _INTERNAL_FLAG_NO_AUTO_REMOVE
This commit is contained in:
parent
3822422b1e
commit
179f250b9a
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 *
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user