mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-14 07:09:57 +00:00
upower: Allow forcing installation even if no AC power is applied
This commit is contained in:
parent
e3b1a3f558
commit
e3f581297f
@ -64,12 +64,12 @@ fu_plugin_update_prepare (FuPlugin *plugin,
|
||||
g_warning ("failed to get OnBattery value, assume on AC power");
|
||||
return TRUE;
|
||||
}
|
||||
if (g_variant_get_boolean (value)) {
|
||||
if (g_variant_get_boolean (value) && (flags & FWUPD_INSTALL_FLAG_FORCE) == 0) {
|
||||
g_set_error_literal (error,
|
||||
FWUPD_ERROR,
|
||||
FWUPD_ERROR_AC_POWER_REQUIRED,
|
||||
"Cannot install update "
|
||||
"when not on AC power");
|
||||
"when not on AC power unless forced");
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user