mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-25 21:57:47 +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;
|
gsize actual_length;
|
||||||
|
|
||||||
/* low level packet debugging */
|
/* low level packet debugging */
|
||||||
if (g_getenv ("FWUPD_DFU_VERBOSE") != NULL) {
|
if (g_getenv ("FWUPD_DFU_VERBOSE") != NULL)
|
||||||
gsize sz = 0;
|
fu_common_dump_bytes (G_LOG_DOMAIN, "Message", bytes);
|
||||||
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_usb_device_control_transfer (usb_device,
|
if (!g_usb_device_control_transfer (usb_device,
|
||||||
G_USB_DEVICE_DIRECTION_HOST_TO_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 */
|
/* low level packet debugging */
|
||||||
if (g_getenv ("FWUPD_DFU_VERBOSE") != NULL) {
|
if (g_getenv ("FWUPD_DFU_VERBOSE") != NULL)
|
||||||
for (gsize i = 0; i < actual_length; i++)
|
fu_common_dump_raw (G_LOG_DOMAIN, "Message", buf, actual_length);
|
||||||
g_print ("Message: r[%" G_GSIZE_FORMAT "] = 0x%02x\n", i, (guint) buf[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return g_bytes_new_take (buf, actual_length);
|
return g_bytes_new_take (buf, actual_length);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user