mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-24 15:26:40 +00:00
dfu: Use the standard debugging helpers
This commit is contained in:
parent
93867eda8e
commit
e6dea87cb0
@ -724,12 +724,8 @@ dfu_target_download_chunk (DfuTarget *target, guint16 index, GBytes *bytes, GErr
|
||||
gsize actual_length;
|
||||
|
||||
/* low level packet debugging */
|
||||
if (g_getenv ("FWUPD_DFU_VERBOSE") != NULL) {
|
||||
gsize sz = 0;
|
||||
const guint8 *data = g_bytes_get_data (bytes, &sz);
|
||||
for (gsize i = 0; i < sz; i++)
|
||||
g_print ("Message: m[%" G_GSIZE_FORMAT "] = 0x%02x\n", i, (guint) data[i]);
|
||||
}
|
||||
if (g_getenv ("FWUPD_DFU_VERBOSE") != NULL)
|
||||
fu_common_dump_bytes (G_LOG_DOMAIN, "Message", bytes);
|
||||
|
||||
if (!g_usb_device_control_transfer (usb_device,
|
||||
G_USB_DEVICE_DIRECTION_HOST_TO_DEVICE,
|
||||
@ -817,10 +813,8 @@ dfu_target_upload_chunk (DfuTarget *target, guint16 index, gsize buf_sz, GError
|
||||
}
|
||||
|
||||
/* low level packet debugging */
|
||||
if (g_getenv ("FWUPD_DFU_VERBOSE") != NULL) {
|
||||
for (gsize i = 0; i < actual_length; i++)
|
||||
g_print ("Message: r[%" G_GSIZE_FORMAT "] = 0x%02x\n", i, (guint) buf[i]);
|
||||
}
|
||||
if (g_getenv ("FWUPD_DFU_VERBOSE") != NULL)
|
||||
fu_common_dump_raw (G_LOG_DOMAIN, "Message", buf, actual_length);
|
||||
|
||||
return g_bytes_new_take (buf, actual_length);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user