Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset a57fa32 in mainline


Ignore:
Timestamp:
2018-05-25T19:38:40Z (3 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
ed88c8e
Parents:
a05ec66
Message:

Fix USB match IDs that need zero-padding

In format string, when using # and 0 flag characters, the field width
that follows needs to take into account the extra width of the "0x"
prefix for the x conversion specifier.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/ddf_helpers.c

    ra05ec66 ra57fa32  
    373373                /* First, with release number. */
    374374                ADD_MATCHID_OR_RETURN(l, 100,
    375                     "usb&vendor=%#04x&product=%#04x&release=%x.%x",
     375                    "usb&vendor=%#06x&product=%#06x&release=%x.%x",
    376376                    d->vendor_id, d->product_id, (d->device_version >> 8),
    377377                    (d->device_version & 0xff));
    378378
    379379                /* Next, without release number. */
    380                 ADD_MATCHID_OR_RETURN(l, 90, "usb&vendor=%#04x&product=%#04x",
     380                ADD_MATCHID_OR_RETURN(l, 90, "usb&vendor=%#06x&product=%#06x",
    381381                    d->vendor_id, d->product_id);
    382382        }
Note: See TracChangeset for help on using the changeset viewer.