usb: print attached status in info qtree

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/hw/usb-bus.c b/hw/usb-bus.c
index 87dcc7f..99d185e 100644
--- a/hw/usb-bus.c
+++ b/hw/usb-bus.c
@@ -226,9 +226,10 @@
     USBDevice *dev = DO_UPCAST(USBDevice, qdev, qdev);
     USBBus *bus = usb_bus_from_device(dev);
 
-    monitor_printf(mon, "%*saddr %d.%d, speed %s, name %s\n", indent, "",
-                   bus->busnr, dev->addr,
-                   usb_speed(dev->speed), dev->devname);
+    monitor_printf(mon, "%*saddr %d.%d, speed %s, name %s%s\n",
+                   indent, "", bus->busnr, dev->addr,
+                   usb_speed(dev->speed), dev->devname,
+                   dev->attached ? ", attached" : "");
 }
 
 void usb_info(Monitor *mon)