mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-05 11:47:40 +00:00
trivial: fu-util: show no updatable devices error for update command
This makes it mirror the behavior of `get-updates` command.
This commit is contained in:
parent
eeb6c22c1e
commit
d122facc09
@ -1811,6 +1811,7 @@ static gboolean
|
||||
fu_util_update_all (FuUtilPrivate *priv, GError **error)
|
||||
{
|
||||
g_autoptr(GPtrArray) devices = NULL;
|
||||
gboolean supported = FALSE;
|
||||
|
||||
/* get devices from daemon */
|
||||
devices = fwupd_client_get_devices (priv->client, NULL, error);
|
||||
@ -1831,6 +1832,7 @@ fu_util_update_all (FuUtilPrivate *priv, GError **error)
|
||||
continue;
|
||||
if (!fu_util_filter_device (priv, dev))
|
||||
continue;
|
||||
supported = TRUE;
|
||||
|
||||
/* get the releases for this device and filter for validity */
|
||||
rels = fwupd_client_get_upgrades (priv->client,
|
||||
@ -1853,6 +1855,15 @@ fu_util_update_all (FuUtilPrivate *priv, GError **error)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* no devices supported by LVFS or all are filtered */
|
||||
if (!supported) {
|
||||
g_set_error_literal (error,
|
||||
FWUPD_ERROR,
|
||||
FWUPD_ERROR_NOTHING_TO_DO,
|
||||
"No updatable devices");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* we don't want to ask anything */
|
||||
if (priv->no_reboot_check) {
|
||||
g_debug ("skipping reboot check");
|
||||
|
Loading…
Reference in New Issue
Block a user