mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-15 13:59:15 +00:00
trivial: Do not use FuProgressbar in dfu-tool
This is a debug-only command line program, and we don't want plugins to have access to the animated progressbar header in the future.
This commit is contained in:
parent
ed3f6cfd4f
commit
f0f504c740
@ -61,7 +61,6 @@
|
|||||||
<xi:include href="xml/fu-mutex.xml"/>
|
<xi:include href="xml/fu-mutex.xml"/>
|
||||||
<xi:include href="xml/fu-plugin-vfuncs.xml"/>
|
<xi:include href="xml/fu-plugin-vfuncs.xml"/>
|
||||||
<xi:include href="xml/fu-plugin.xml"/>
|
<xi:include href="xml/fu-plugin.xml"/>
|
||||||
<xi:include href="xml/fu-progressbar.xml"/>
|
|
||||||
<xi:include href="xml/fu-quirks.xml"/>
|
<xi:include href="xml/fu-quirks.xml"/>
|
||||||
<xi:include href="xml/fu-smbios.xml"/>
|
<xi:include href="xml/fu-smbios.xml"/>
|
||||||
<xi:include href="xml/fu-test.xml"/>
|
<xi:include href="xml/fu-test.xml"/>
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include "dfu-sector.h"
|
#include "dfu-sector.h"
|
||||||
|
|
||||||
#include "fu-device-locker.h"
|
#include "fu-device-locker.h"
|
||||||
#include "fu-progressbar.h"
|
|
||||||
|
|
||||||
#include "fwupd-error.h"
|
#include "fwupd-error.h"
|
||||||
|
|
||||||
@ -26,7 +25,6 @@ typedef struct {
|
|||||||
gboolean force;
|
gboolean force;
|
||||||
gchar *device_vid_pid;
|
gchar *device_vid_pid;
|
||||||
guint16 transfer_size;
|
guint16 transfer_size;
|
||||||
FuProgressbar *progressbar;
|
|
||||||
FuQuirks *quirks;
|
FuQuirks *quirks;
|
||||||
} DfuToolPrivate;
|
} DfuToolPrivate;
|
||||||
|
|
||||||
@ -47,7 +45,6 @@ dfu_tool_private_free (DfuToolPrivate *priv)
|
|||||||
if (priv == NULL)
|
if (priv == NULL)
|
||||||
return;
|
return;
|
||||||
g_free (priv->device_vid_pid);
|
g_free (priv->device_vid_pid);
|
||||||
g_object_unref (priv->progressbar);
|
|
||||||
g_object_unref (priv->cancellable);
|
g_object_unref (priv->cancellable);
|
||||||
g_object_unref (priv->quirks);
|
g_object_unref (priv->quirks);
|
||||||
if (priv->cmd_array != NULL)
|
if (priv->cmd_array != NULL)
|
||||||
@ -654,9 +651,9 @@ dfu_tool_convert (DfuToolPrivate *priv, gchar **values, GError **error)
|
|||||||
static void
|
static void
|
||||||
fu_tool_action_changed_cb (FuDevice *device, GParamSpec *pspec, DfuToolPrivate *priv)
|
fu_tool_action_changed_cb (FuDevice *device, GParamSpec *pspec, DfuToolPrivate *priv)
|
||||||
{
|
{
|
||||||
fu_progressbar_update (priv->progressbar,
|
g_print ("%s:\t%u%%\n",
|
||||||
fu_device_get_status (device),
|
fwupd_status_to_string (fu_device_get_status (device)),
|
||||||
fu_device_get_progress (device));
|
fu_device_get_progress (device));
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -1313,11 +1310,6 @@ main (int argc, char *argv[])
|
|||||||
_("Replace data in an existing firmware file"),
|
_("Replace data in an existing firmware file"),
|
||||||
dfu_tool_replace_data);
|
dfu_tool_replace_data);
|
||||||
|
|
||||||
/* use animated progress bar */
|
|
||||||
priv->progressbar = fu_progressbar_new ();
|
|
||||||
fu_progressbar_set_length_percentage (priv->progressbar, 50);
|
|
||||||
fu_progressbar_set_length_status (priv->progressbar, 20);
|
|
||||||
|
|
||||||
/* use quirks */
|
/* use quirks */
|
||||||
priv->quirks = fu_quirks_new ();
|
priv->quirks = fu_quirks_new ();
|
||||||
if (!fu_quirks_load (priv->quirks, FU_QUIRKS_LOAD_FLAG_NONE, &error)) {
|
if (!fu_quirks_load (priv->quirks, FU_QUIRKS_LOAD_FLAG_NONE, &error)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user