mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-15 06:14:03 +00:00
Merge pull request #72 from dell/ac-warning
Show a different error when checking for updates while on battery power
This commit is contained in:
commit
0d7c113ea3
@ -1658,6 +1658,9 @@ fu_main_daemon_method_call (GDBusConnection *connection, const gchar *sender,
|
|||||||
if (g_error_matches (error,
|
if (g_error_matches (error,
|
||||||
FWUPD_ERROR,
|
FWUPD_ERROR,
|
||||||
FWUPD_ERROR_NOTHING_TO_DO)) {
|
FWUPD_ERROR_NOTHING_TO_DO)) {
|
||||||
|
if (fu_main_on_battery (priv))
|
||||||
|
g_prefix_error (&error, "No devices can be updated while operating on battery power: ");
|
||||||
|
else
|
||||||
g_prefix_error (&error, "No devices can be updated: ");
|
g_prefix_error (&error, "No devices can be updated: ");
|
||||||
}
|
}
|
||||||
fu_main_invocation_return_error (priv, invocation, error);
|
fu_main_invocation_return_error (priv, invocation, error);
|
||||||
|
Loading…
Reference in New Issue
Block a user