mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-08 01:14:43 +00:00
trivial: Print the transfer size in the 'dfu-tool list' output
This commit is contained in:
parent
c6a8deeb4c
commit
2fd030e663
@ -1861,6 +1861,7 @@ dfu_tool_list (DfuToolPrivate *priv, gchar **values, GError **error)
|
|||||||
GPtrArray *dfu_targets;
|
GPtrArray *dfu_targets;
|
||||||
const gchar *tmp;
|
const gchar *tmp;
|
||||||
guint j;
|
guint j;
|
||||||
|
guint16 transfer_size;
|
||||||
g_autofree gchar *quirks = NULL;
|
g_autofree gchar *quirks = NULL;
|
||||||
g_autofree gchar *version = NULL;
|
g_autofree gchar *version = NULL;
|
||||||
g_autoptr(GError) error_local = NULL;
|
g_autoptr(GError) error_local = NULL;
|
||||||
@ -1924,6 +1925,15 @@ dfu_tool_list (DfuToolPrivate *priv, gchar **values, GError **error)
|
|||||||
/* TRANSLATORS: device state, i.e. appIDLE */
|
/* TRANSLATORS: device state, i.e. appIDLE */
|
||||||
dfu_tool_print_indent (_("State"), tmp, 1);
|
dfu_tool_print_indent (_("State"), tmp, 1);
|
||||||
|
|
||||||
|
transfer_size = dfu_device_get_transfer_size (device);
|
||||||
|
if (transfer_size > 0) {
|
||||||
|
g_autofree gchar *str = NULL;
|
||||||
|
str = g_format_size_full (transfer_size,
|
||||||
|
G_FORMAT_SIZE_LONG_FORMAT);
|
||||||
|
/* TRANSLATORS: transfer size in bytes */
|
||||||
|
dfu_tool_print_indent (_("Transfer Size"), str, 1);
|
||||||
|
}
|
||||||
|
|
||||||
/* quirks are NULL if none are set */
|
/* quirks are NULL if none are set */
|
||||||
quirks = dfu_device_get_quirks_as_string (device);
|
quirks = dfu_device_get_quirks_as_string (device);
|
||||||
if (quirks != NULL) {
|
if (quirks != NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user