mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-14 21:50:25 +00:00
Show the human-readable version in the 'dfu-tool dump' output
This commit is contained in:
parent
df7ba314b2
commit
c951e3a2ff
@ -80,6 +80,7 @@ libdfu_la_SOURCES = \
|
|||||||
dfu-target-private.h
|
dfu-target-private.h
|
||||||
|
|
||||||
libdfu_la_LIBADD = \
|
libdfu_la_LIBADD = \
|
||||||
|
$(APPSTREAM_GLIB_LIBS) \
|
||||||
$(ELF_LIBS) \
|
$(ELF_LIBS) \
|
||||||
$(GUSB_LIBS) \
|
$(GUSB_LIBS) \
|
||||||
$(GLIB_LIBS) \
|
$(GLIB_LIBS) \
|
||||||
@ -131,6 +132,7 @@ dfu_self_test_SOURCES = \
|
|||||||
|
|
||||||
dfu_self_test_LDADD = \
|
dfu_self_test_LDADD = \
|
||||||
$(lib_LTLIBRARIES) \
|
$(lib_LTLIBRARIES) \
|
||||||
|
$(APPSTREAM_GLIB_LIBS) \
|
||||||
$(GLIB_LIBS) \
|
$(GLIB_LIBS) \
|
||||||
$(GUSB_LIBS)
|
$(GUSB_LIBS)
|
||||||
|
|
||||||
@ -146,7 +148,7 @@ introspection_sources = \
|
|||||||
$(libdfu_la_SOURCES)
|
$(libdfu_la_SOURCES)
|
||||||
|
|
||||||
Dfu-1.0.gir: libdfu.la
|
Dfu-1.0.gir: libdfu.la
|
||||||
Dfu_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0 GUsb-1.0
|
Dfu_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0 GUsb-1.0 AppStreamGlib-1.0
|
||||||
Dfu_1_0_gir_CFLAGS = $(AM_CPPFLAGS)
|
Dfu_1_0_gir_CFLAGS = $(AM_CPPFLAGS)
|
||||||
Dfu_1_0_gir_SCANNERFLAGS = --identifier-prefix=Dfu \
|
Dfu_1_0_gir_SCANNERFLAGS = --identifier-prefix=Dfu \
|
||||||
--symbol-prefix=dfu \
|
--symbol-prefix=dfu \
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <appstream-glib.h>
|
||||||
|
|
||||||
#include "dfu-common.h"
|
#include "dfu-common.h"
|
||||||
#include "dfu-error.h"
|
#include "dfu-error.h"
|
||||||
@ -678,14 +679,18 @@ dfu_firmware_to_string (DfuFirmware *firmware)
|
|||||||
GList *l;
|
GList *l;
|
||||||
GString *str;
|
GString *str;
|
||||||
guint i;
|
guint i;
|
||||||
|
g_autofree gchar *release_str = NULL;
|
||||||
g_autoptr(GList) keys = NULL;
|
g_autoptr(GList) keys = NULL;
|
||||||
|
|
||||||
g_return_val_if_fail (DFU_IS_FIRMWARE (firmware), NULL);
|
g_return_val_if_fail (DFU_IS_FIRMWARE (firmware), NULL);
|
||||||
|
|
||||||
|
release_str = as_utils_version_from_uint16 (priv->release,
|
||||||
|
AS_VERSION_PARSE_FLAG_NONE);
|
||||||
str = g_string_new ("");
|
str = g_string_new ("");
|
||||||
g_string_append_printf (str, "vid: 0x%04x\n", priv->vid);
|
g_string_append_printf (str, "vid: 0x%04x\n", priv->vid);
|
||||||
g_string_append_printf (str, "pid: 0x%04x\n", priv->pid);
|
g_string_append_printf (str, "pid: 0x%04x\n", priv->pid);
|
||||||
g_string_append_printf (str, "release: 0x%04x\n", priv->release);
|
g_string_append_printf (str, "release: 0x%04x [%s]\n",
|
||||||
|
priv->release, release_str);
|
||||||
g_string_append_printf (str, "format: %s [0x%04x]\n",
|
g_string_append_printf (str, "format: %s [0x%04x]\n",
|
||||||
dfu_firmware_format_to_string (priv->format),
|
dfu_firmware_format_to_string (priv->format),
|
||||||
priv->format);
|
priv->format);
|
||||||
|
@ -7,6 +7,6 @@ Name: dfu
|
|||||||
Description: libdfu is a library for reading and writing USB device firmware
|
Description: libdfu is a library for reading and writing USB device firmware
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Requires: glib-2.0, gobject-2.0, gio-2.0
|
Requires: glib-2.0, gobject-2.0, gio-2.0
|
||||||
Requires.private: elf
|
Requires.private: elf, appstream-glib
|
||||||
Libs: -L${libdir} -ldfu
|
Libs: -L${libdir} -ldfu
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
Loading…
Reference in New Issue
Block a user