提交 52234bc0 编写于 作者: H Hans de Goede 提交者: Gerd Hoffmann

usb-redir: Fix printing of device version

The device version is in bcd format, which requires some special handling to
print.
Signed-off-by: NHans de Goede <hdegoede@redhat.com>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 01cd4e98
......@@ -1049,8 +1049,10 @@ static void usbredir_device_connect(void *priv,
usb_redir_cap_connect_device_version)) {
INFO("attaching %s device %04x:%04x version %d.%d class %02x\n",
speed, device_connect->vendor_id, device_connect->product_id,
device_connect->device_version_bcd >> 8,
device_connect->device_version_bcd & 0xff,
((device_connect->device_version_bcd & 0xf000) >> 12) * 10 +
((device_connect->device_version_bcd & 0x0f00) >> 8),
((device_connect->device_version_bcd & 0x00f0) >> 4) * 10 +
((device_connect->device_version_bcd & 0x000f) >> 0),
device_connect->device_class);
} else {
INFO("attaching %s device %04x:%04x class %02x\n", speed,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册