From: Peter Hutterer Date: Thu, 29 Apr 2021 00:04:46 +0000 (+1000) Subject: tools/record: print the HID report descriptor as hex X-Git-Tag: 1.17.901~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7da7cd216f42a223d38b587556e33e74a08e225e;p=platform%2Fupstream%2Flibinput.git 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 --- 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 = ", "; } }