mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-14 17:28:20 +00:00
trivial: Add a 'clear-history' command to fwupdmgr
This needs to be run as the root user to work.
This commit is contained in:
parent
bc3a4e1f57
commit
af54a0778a
@ -562,6 +562,13 @@ fu_util_install_prepared (FuUtilPrivate *priv, gchar **values, GError **error)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
fu_util_clear_history (FuUtilPrivate *priv, gchar **values, GError **error)
|
||||||
|
{
|
||||||
|
g_autoptr(FuHistory) history = fu_history_new ();
|
||||||
|
return fu_history_remove_all (history, error);
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_util_clear_results (FuUtilPrivate *priv, gchar **values, GError **error)
|
fu_util_clear_results (FuUtilPrivate *priv, gchar **values, GError **error)
|
||||||
{
|
{
|
||||||
@ -1672,6 +1679,12 @@ main (int argc, char *argv[])
|
|||||||
/* TRANSLATORS: command description */
|
/* TRANSLATORS: command description */
|
||||||
_("Install prepared updates now"),
|
_("Install prepared updates now"),
|
||||||
fu_util_install_prepared);
|
fu_util_install_prepared);
|
||||||
|
fu_util_add (priv->cmd_array,
|
||||||
|
"clear-history",
|
||||||
|
NULL,
|
||||||
|
/* TRANSLATORS: command description */
|
||||||
|
_("Erase all firmware update history"),
|
||||||
|
fu_util_clear_history);
|
||||||
fu_util_add (priv->cmd_array,
|
fu_util_add (priv->cmd_array,
|
||||||
"install",
|
"install",
|
||||||
"FILE [ID]",
|
"FILE [ID]",
|
||||||
|
Loading…
Reference in New Issue
Block a user