summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2018-04-17 10:09:19 -0500
committerAleksander Morgado <aleksander@aleksander.es>2018-07-06 11:41:35 +0200
commited457a700b3977699dc52660d1e7b21da4709181 (patch)
treee99f651ea8f3bdd0ede2334a7f0d6ba6035a40a4
parentd00257dc8723204ac4bf612c3d4eb4da718cc3cf (diff)
qmi-firmware-update: fix byte counts in error message
(cherry picked from commit 6edb62f1d48f6fce7bfb9e91497810754ae8e965)
-rw-r--r--src/qmi-firmware-update/qfu-at-device.c2
-rw-r--r--src/qmi-firmware-update/qfu-qdl-device.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/qmi-firmware-update/qfu-at-device.c b/src/qmi-firmware-update/qfu-at-device.c
index a6604a3..c6f5f41 100644
--- a/src/qmi-firmware-update/qfu-at-device.c
+++ b/src/qmi-firmware-update/qfu-at-device.c
@@ -113,7 +113,7 @@ send_request (QfuAtDevice *self,
if (wlen != strlen (request)) {
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"error writing: only %" G_GSSIZE_FORMAT "/%" G_GSIZE_FORMAT " bytes written",
- wlen, wlen);
+ wlen, strlen (request));
return FALSE;
}
diff --git a/src/qmi-firmware-update/qfu-qdl-device.c b/src/qmi-firmware-update/qfu-qdl-device.c
index 8055433..190d526 100644
--- a/src/qmi-firmware-update/qfu-qdl-device.c
+++ b/src/qmi-firmware-update/qfu-qdl-device.c
@@ -269,7 +269,7 @@ send_request (QfuQdlDevice *self,
if (wlen != request_size) {
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"error writing: only %" G_GSSIZE_FORMAT "/%" G_GSIZE_FORMAT " bytes written",
- wlen, wlen);
+ wlen, request_size);
return FALSE;
}