Patchwork [PATCHv2,1/2] Add bootindex handling into usb storage device.

login
register
mail settings
Submitter Gleb Natapov
Date Jan. 30, 2011, 10:29 a.m.
Message ID <1296383359-19082-1-git-send-email-gleb@redhat.com>
Download mbox | patch
Permalink /patch/81012/
State New
Headers show

Comments

Gleb Natapov - Jan. 30, 2011, 10:29 a.m.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
 hw/usb-msd.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Markus Armbruster - Jan. 31, 2011, 8:20 a.m.
Both patches look fine to me.

Patch

diff --git a/hw/usb-msd.c b/hw/usb-msd.c
index 11722c7..d9df4f2 100644
--- a/hw/usb-msd.c
+++ b/hw/usb-msd.c
@@ -532,6 +532,7 @@  static int usb_msd_initfn(USBDevice *dev)
         }
     }
 
+    add_boot_device_path(s->conf.bootindex, &dev->qdev, "/disk@0,0");
     return 0;
 }
 
@@ -596,6 +597,7 @@  static USBDevice *usb_msd_init(const char *filename)
 static struct USBDeviceInfo msd_info = {
     .product_desc   = "QEMU USB MSD",
     .qdev.name      = "usb-storage",
+    .qdev.fw_name      = "storage",
     .qdev.size      = sizeof(MSDState),
     .usb_desc       = &desc,
     .init           = usb_msd_initfn,