summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2021-04-29 10:04:46 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2021-04-30 14:54:35 +1000
commit7da7cd216f42a223d38b587556e33e74a08e225e (patch)
tree9ab2942ee163a099705e0eaea8e9e58d902c3e20
parent57811e40f0dac5d357267837f4b18d16943bf4e1 (diff)
downloadlibinput-7da7cd216f42a223d38b587556e33e74a08e225e.tar.gz
tools/record: print the HID report descriptor as hex
YAML does support hex as long as it's 0x-prefixed. The comment here (probably) dates from an in-development version of libinput-record that used JSON. Anyway, let's print the HID report descriptor as hex because that's the common format for it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--tools/libinput-record.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/libinput-record.c b/tools/libinput-record.c
index 3ad593fc..a4d055a4 100644
--- a/tools/libinput-record.c
+++ b/tools/libinput-record.c
@@ -1597,8 +1597,7 @@ print_hid_report_descriptor(struct record_device *dev)
while ((len = read(fd, buf, sizeof(buf))) > 0) {
for (int i = 0; i < len; i++) {
- /* YAML requires decimal */
- iprintf(dev->fp, I_NONE, "%s%u", sep, buf[i]);
+ iprintf(dev->fp, I_NONE, "%s0x%02x", sep, buf[i]);
sep = ", ";
}
}