Changeset a57fa32 in mainline for uspace/lib/usbhost/src/ddf_helpers.c


Ignore:
Timestamp:
2018-05-25T19:38:40Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
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.