Piotr Caban : winebus.sys: Add more traces on hidraw communication errors.

Alexandre Julliard julliard at winehq.org
Fri May 3 15:46:17 CDT 2019


Module: wine
Branch: master
Commit: 926797383536df797fb8f7e8643a5805559ab539
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=926797383536df797fb8f7e8643a5805559ab539

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Fri May  3 11:57:52 2019 +0200

winebus.sys: Add more traces on hidraw communication errors.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winebus.sys/bus_udev.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c
index 99753d6..e8e837a 100644
--- a/dlls/winebus.sys/bus_udev.c
+++ b/dlls/winebus.sys/bus_udev.c
@@ -765,7 +765,7 @@ static DWORD CALLBACK device_report_thread(void *args)
             break;
         size = read(plfds[0].fd, report_buffer, sizeof(report_buffer));
         if (size == -1)
-            TRACE_(hid_report)("Read failed. Likely an unplugged device\n");
+            TRACE_(hid_report)("Read failed. Likely an unplugged device %d %s\n", errno, strerror(errno));
         else if (size == 0)
             TRACE_(hid_report)("Failed to read report\n");
         else
@@ -827,6 +827,7 @@ static NTSTATUS hidraw_set_output_report(DEVICE_OBJECT *device, UCHAR id, BYTE *
     }
     else
     {
+        TRACE("write failed: %d %d %s\n", rc, errno, strerror(errno));
         *written = 0;
         return STATUS_UNSUCCESSFUL;
     }
@@ -847,6 +848,7 @@ static NTSTATUS hidraw_get_feature_report(DEVICE_OBJECT *device, UCHAR id, BYTE
     }
     else
     {
+        TRACE_(hid_report)("ioctl(HIDIOCGFEATURE(%d)) failed: %d %s\n", length, errno, strerror(errno));
         *read = 0;
         return STATUS_UNSUCCESSFUL;
     }
@@ -887,6 +889,7 @@ static NTSTATUS hidraw_set_feature_report(DEVICE_OBJECT *device, UCHAR id, BYTE
     }
     else
     {
+        TRACE_(hid_report)("ioctl(HIDIOCSFEATURE(%d)) failed: %d %s\n", length, errno, strerror(errno));
         *written = 0;
         return STATUS_UNSUCCESSFUL;
     }




More information about the wine-cvs mailing list