mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-27 16:16:50 +00:00
trivial: Do not return failure if a device flag is already set
If we have multiple versions of upgrades/downgrades we'll be setting the REPORTED flags for multiple history entries at once.
This commit is contained in:
parent
1a24d9da90
commit
ee7e764603
@ -630,13 +630,8 @@ fu_engine_modify_device (FuEngine *self,
|
|||||||
"key %s not a valid flag", key);
|
"key %s not a valid flag", key);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (fu_device_has_flag (device, flag)) {
|
if (fu_device_has_flag (device, flag))
|
||||||
g_set_error_literal (error,
|
return TRUE;
|
||||||
FWUPD_ERROR,
|
|
||||||
FWUPD_ERROR_NOT_SUPPORTED,
|
|
||||||
"device already has that flag");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
if (flag != FWUPD_DEVICE_FLAG_REPORTED &&
|
if (flag != FWUPD_DEVICE_FLAG_REPORTED &&
|
||||||
flag != FWUPD_DEVICE_FLAG_NOTIFIED) {
|
flag != FWUPD_DEVICE_FLAG_NOTIFIED) {
|
||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
|
Loading…
Reference in New Issue
Block a user