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

login
register
mail settings
Submitter Gleb Natapov
Date Jan. 2, 2011, 3:04 p.m.
Message ID <1293980672-3515-1-git-send-email-gleb@redhat.com>
Download mbox | patch
Permalink /patch/77187/
State New
Headers show

Comments

Gleb Natapov - Jan. 2, 2011, 3:04 p.m.
---
 hw/usb-msd.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Gleb Natapov - Jan. 2, 2011, 3:07 p.m.
Please ignore. Will resend with Signed-off-by.

On Sun, Jan 02, 2011 at 05:04:31PM +0200, Gleb Natapov wrote:
> ---
>  hw/usb-msd.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/usb-msd.c b/hw/usb-msd.c
> index 0a95d8d..46642a8 100644
> --- a/hw/usb-msd.c
> +++ b/hw/usb-msd.c
> @@ -560,6 +560,7 @@ static int usb_msd_initfn(USBDevice *dev)
>          }
>      }
>  
> +    add_boot_device_path(s->conf.bootindex, &dev->qdev, "/disk@0,0");
>      return 0;
>  }
>  
> @@ -624,6 +625,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),
>      .init           = usb_msd_initfn,
>      .handle_packet  = usb_generic_handle_packet,
> -- 
> 1.7.2.3
> 

--
			Gleb.

Patch

diff --git a/hw/usb-msd.c b/hw/usb-msd.c
index 0a95d8d..46642a8 100644
--- a/hw/usb-msd.c
+++ b/hw/usb-msd.c
@@ -560,6 +560,7 @@  static int usb_msd_initfn(USBDevice *dev)
         }
     }
 
+    add_boot_device_path(s->conf.bootindex, &dev->qdev, "/disk@0,0");
     return 0;
 }
 
@@ -624,6 +625,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),
     .init           = usb_msd_initfn,
     .handle_packet  = usb_generic_handle_packet,