diff --git a/hw/usb-msd.c b/hw/usb-msd.c
index bb39b62..dec35bc 100644
--- a/hw/usb-msd.c
+++ b/hw/usb-msd.c
@@ -591,7 +591,7 @@ static USBDevice *usb_msd_init(const char *filename)
      }

      /* create guest device */
-    dev = usb_create(NULL /* FIXME */, "QEMU USB MSD");
+    dev = usb_create(NULL /* FIXME */, "usb-storage");
      qdev_prop_set_drive(&dev->qdev, "drive", dinfo);
      if (qdev_init(&dev->qdev)<  0)
          return NULL;
@@ -600,8 +600,7 @@ static USBDevice *usb_msd_init(const char *filename)
  }

  static struct USBDeviceInfo msd_info = {
-    .qdev.name      = "QEMU USB MSD",
-    .qdev.alias     = "usb-storage",
+    .qdev.name      = "usb-storage",
      .qdev.size      = sizeof(MSDState),
      .init           = usb_msd_initfn,
      .handle_packet  = usb_generic_handle_packet,

No. USB needs some more care. DeviceInfo->name is also used as default value for USBDevice->devname. See usb_qdev_init(). Most usb backends don't change it. So this change is visible in both 'info usb' monitor command and within the guest (check /proc/bus/usb/devices).

I'd suggest to add a new field to USBDeviceInfo, stick the long name there and use that in usb_qdev_init() then.

Otherwise the patch looks fine to me.

cheers,
  Gerd


Reply via email to