mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-13 19:08:34 +00:00
trivial: Use fwupd_device_remove_flag() to remove a single flag
This commit is contained in:
parent
3f94eabe69
commit
ed0af24406
@ -2348,8 +2348,7 @@ fu_plugin_runner_unlock (FuPlugin *self, FuDevice *device, GError **error)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* update with correct flags */
|
/* update with correct flags */
|
||||||
flags = fu_device_get_flags (device);
|
fu_device_remove_flag (device, FWUPD_DEVICE_FLAG_LOCKED);
|
||||||
fu_device_set_flags (device, flags &= ~FWUPD_DEVICE_FLAG_LOCKED);
|
|
||||||
fu_device_set_modified (device, (guint64) g_get_real_time () / G_USEC_PER_SEC);
|
fu_device_set_modified (device, (guint64) g_get_real_time () / G_USEC_PER_SEC);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -747,7 +747,7 @@ fu_plugin_unlock (FuPlugin *plugin, FuDevice *device, GError **error)
|
|||||||
/* clone the info from real device but prevent it from being flashed */
|
/* clone the info from real device but prevent it from being flashed */
|
||||||
device_flags_alt = fu_device_get_flags (device_alt);
|
device_flags_alt = fu_device_get_flags (device_alt);
|
||||||
fu_device_set_flags (device, device_flags_alt);
|
fu_device_set_flags (device, device_flags_alt);
|
||||||
fu_device_set_flags (device_alt, device_flags_alt & ~FWUPD_DEVICE_FLAG_UPDATABLE);
|
fu_device_remove_flag (device_alt, FWUPD_DEVICE_FLAG_UPDATABLE);
|
||||||
|
|
||||||
/* make sure that this unlocked device can be updated */
|
/* make sure that this unlocked device can be updated */
|
||||||
fu_device_set_version_format (device, FWUPD_VERSION_FORMAT_QUAD);
|
fu_device_set_version_format (device, FWUPD_VERSION_FORMAT_QUAD);
|
||||||
|
Loading…
Reference in New Issue
Block a user