aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2009-12-09 17:07:51 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-12 07:59:38 -0600
commit0fe6d12e0bc752c29a93ac83a274e3650d457069 (patch)
treec64224edae0e3225075045fef03d60caa6bc1600 /hw
parentba32edab7fdab0e74b54696942b4127d26861cf6 (diff)
downloadqemu-0fe6d12e0bc752c29a93ac83a274e3650d457069.zip
qemu-0fe6d12e0bc752c29a93ac83a274e3650d457069.tar.gz
qemu-0fe6d12e0bc752c29a93ac83a274e3650d457069.tar.bz2
qdev: Rename USBDevice member devname to product_desc
It's not a device name, it's the USB product description string. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/bt-hid.c2
-rw-r--r--hw/usb-bus.c11
-rw-r--r--hw/usb-hid.c2
-rw-r--r--hw/usb.h2
4 files changed, 9 insertions, 8 deletions
diff --git a/hw/bt-hid.c b/hw/bt-hid.c
index 020176e..4a04bbd 100644
--- a/hw/bt-hid.c
+++ b/hw/bt-hid.c
@@ -552,7 +552,7 @@ static struct bt_device_s *bt_hid_init(struct bt_scatternet_s *net,
BT_HID_MTU, bt_hid_new_interrupt_ch);
s->usbdev = dev;
- s->btdev.device.lmp_name = s->usbdev->devname;
+ s->btdev.device.lmp_name = s->usbdev->product_desc;
usb_hid_datain_cb(s->usbdev, s, bt_hid_datain);
s->btdev.device.handle_destroy = bt_hid_destroy;
diff --git a/hw/usb-bus.c b/hw/usb-bus.c
index 99d185e..ba1b6e3 100644
--- a/hw/usb-bus.c
+++ b/hw/usb-bus.c
@@ -43,7 +43,7 @@ static int usb_qdev_init(DeviceState *qdev, DeviceInfo *base)
USBDeviceInfo *info = DO_UPCAST(USBDeviceInfo, qdev, base);
int rc;
- pstrcpy(dev->devname, sizeof(dev->devname), qdev->info->name);
+ pstrcpy(dev->product_desc, sizeof(dev->product_desc), qdev->info->name);
dev->info = info;
dev->auto_attach = 1;
rc = dev->info->init(dev);
@@ -131,7 +131,7 @@ static void do_attach(USBDevice *dev)
if (dev->attached) {
fprintf(stderr, "Warning: tried to attach usb device %s twice\n",
- dev->devname);
+ dev->product_desc);
return;
}
dev->attached++;
@@ -166,7 +166,7 @@ int usb_device_detach(USBDevice *dev)
if (!dev->attached) {
fprintf(stderr, "Warning: tried to detach unattached usb device %s\n",
- dev->devname);
+ dev->product_desc);
return -1;
}
dev->attached--;
@@ -228,7 +228,7 @@ static void usb_bus_dev_print(Monitor *mon, DeviceState *qdev, int indent)
monitor_printf(mon, "%*saddr %d.%d, speed %s, name %s%s\n",
indent, "", bus->busnr, dev->addr,
- usb_speed(dev->speed), dev->devname,
+ usb_speed(dev->speed), dev->product_desc,
dev->attached ? ", attached" : "");
}
@@ -249,7 +249,8 @@ void usb_info(Monitor *mon)
if (!dev)
continue;
monitor_printf(mon, " Device %d.%d, Speed %s Mb/s, Product %s\n",
- bus->busnr, dev->addr, usb_speed(dev->speed), dev->devname);
+ bus->busnr, dev->addr, usb_speed(dev->speed),
+ dev->product_desc);
}
}
}
diff --git a/hw/usb-hid.c b/hw/usb-hid.c
index f4a2a48..6621f72 100644
--- a/hw/usb-hid.c
+++ b/hw/usb-hid.c
@@ -701,7 +701,7 @@ static int usb_hid_handle_control(USBDevice *dev, int request, int value,
break;
case 2:
/* product description */
- ret = set_usb_string(data, s->dev.devname);
+ ret = set_usb_string(data, s->dev.product_desc);
break;
case 3:
/* vendor description */
diff --git a/hw/usb.h b/hw/usb.h
index 351c466..39aba99 100644
--- a/hw/usb.h
+++ b/hw/usb.h
@@ -132,7 +132,7 @@ struct USBDevice {
int speed;
uint8_t addr;
- char devname[32];
+ char product_desc[32];
int auto_attach;
int attached;