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 <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2023-08-28 13:14:22 +10:00
parent 1680f2fbaa
commit 65eaabf91f

View file

@ -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),