mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-13 11:50:45 +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;
|
||||
}
|
||||
|
||||
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
|
||||
fu_util_clear_results (FuUtilPrivate *priv, gchar **values, GError **error)
|
||||
{
|
||||
@ -1672,6 +1679,12 @@ main (int argc, char *argv[])
|
||||
/* TRANSLATORS: command description */
|
||||
_("Install prepared updates now"),
|
||||
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,
|
||||
"install",
|
||||
"FILE [ID]",
|
||||
|
Loading…
Reference in New Issue
Block a user