From 54a5a217574ca9d6c37cce934220d9747fdd43f4 Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Wed, 19 Oct 2016 14:29:53 -0500 Subject: [PATCH] Show a different error when checking for updates while on battery power (#68) --- src/fu-main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fu-main.c b/src/fu-main.c index 5dd4439c2..bf72185bd 100644 --- a/src/fu-main.c +++ b/src/fu-main.c @@ -1658,7 +1658,10 @@ fu_main_daemon_method_call (GDBusConnection *connection, const gchar *sender, if (g_error_matches (error, FWUPD_ERROR, FWUPD_ERROR_NOTHING_TO_DO)) { - g_prefix_error (&error, "No devices can be updated: "); + 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: "); } fu_main_invocation_return_error (priv, invocation, error); return;