Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shawn Webb
Fwupd
Commits
ed0af244
Commit
ed0af244
authored
Feb 22, 2021
by
Richard Hughes
Browse files
trivial: Use fwupd_device_remove_flag() to remove a single flag
parent
3f94eabe
Changes
2
Hide whitespace changes
Inline
Side-by-side
libfwupdplugin/fu-plugin.c
View file @
ed0af244
...
...
@@ -2348,8 +2348,7 @@ fu_plugin_runner_unlock (FuPlugin *self, FuDevice *device, GError **error)
return
FALSE
;
/* update with correct flags */
flags
=
fu_device_get_flags
(
device
);
fu_device_set_flags
(
device
,
flags
&=
~
FWUPD_DEVICE_FLAG_LOCKED
);
fu_device_remove_flag
(
device
,
FWUPD_DEVICE_FLAG_LOCKED
);
fu_device_set_modified
(
device
,
(
guint64
)
g_get_real_time
()
/
G_USEC_PER_SEC
);
return
TRUE
;
}
...
...
plugins/uefi-capsule/fu-plugin-uefi-capsule.c
View file @
ed0af244
...
...
@@ -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 */
device_flags_alt
=
fu_device_get_flags
(
device_alt
);
fu_device_set_flags
(
device
,
device_flags_alt
);
fu_device_
set
_flag
s
(
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 */
fu_device_set_version_format
(
device
,
FWUPD_VERSION_FORMAT_QUAD
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment