From 65eaabf91f58c29cc93214ae06370c95340303d6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 28 Aug 2023 13:14:22 +1000 Subject: [PATCH] tools/record: print the vid/pid with proper 4 hex digits The field with includes the 0x if printing with "0x04d". And because that format prints zero as just 0000, let's move the 0x prefix out and let printf only handle the actual number. Signed-off-by: Peter Hutterer --- tools/libinput-record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libinput-record.c b/tools/libinput-record.c index 30b29002..be160383 100644 --- a/tools/libinput-record.c +++ b/tools/libinput-record.c @@ -1490,7 +1490,7 @@ print_description(FILE *fp, struct libevdev *dev) iprintf(fp, I_EVDEV, "# Name: %s\n", libevdev_get_name(dev)); iprintf(fp, I_EVDEV, - "# ID: bus %#02x vendor %#02x product %#02x version %#02x\n", + "# ID: bus 0x%04x vendor 0x%04x product 0x%04x version 0x%04x\n", libevdev_get_id_bustype(dev), libevdev_get_id_vendor(dev), libevdev_get_id_product(dev),