[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.2-testing] ioemu: Fix usbdevice parameter to encode vbd type.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1214582459 -3600 # Node ID df2af4150d76d4d2f55ef258ee7314a1b6235c6e # Parent 6e20e634ccd654ccb8e2802d25f3c66f0d98bd01 ioemu: Fix usbdevice parameter to encode vbd type. usbdevice = "disk:<filename>" expect a raw device (as this probably is the most usual case) and usbdevice = "disk-qcow:<filename>" expect a COW image (autodetected, probably qcow2). Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> xen-unstable changeset: 17877:52592af0204a55abd0898b1fbe390a55036079e2 xen-unstable date: Wed Jun 18 11:55:34 2008 +0100 --- tools/ioemu/hw/usb-msd.c | 4 ++-- tools/ioemu/hw/usb.h | 2 +- tools/ioemu/vl.c | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff -r 6e20e634ccd6 -r df2af4150d76 tools/ioemu/hw/usb-msd.c --- a/tools/ioemu/hw/usb-msd.c Fri Jun 27 17:00:22 2008 +0100 +++ b/tools/ioemu/hw/usb-msd.c Fri Jun 27 17:00:59 2008 +0100 @@ -510,7 +510,7 @@ static void usb_msd_handle_destroy(USBDe qemu_free(s); } -USBDevice *usb_msd_init(const char *filename) +USBDevice *usb_msd_init(const char *filename, BlockDriver *drv) { MSDState *s; BlockDriverState *bdrv; @@ -520,7 +520,7 @@ USBDevice *usb_msd_init(const char *file return NULL; bdrv = bdrv_new("usb"); - if (bdrv_open(bdrv, filename, 0) < 0) + if (bdrv_open2(bdrv, filename, 0, drv) < 0) goto fail; s->bs = bdrv; diff -r 6e20e634ccd6 -r df2af4150d76 tools/ioemu/hw/usb.h --- a/tools/ioemu/hw/usb.h Fri Jun 27 17:00:22 2008 +0100 +++ b/tools/ioemu/hw/usb.h Fri Jun 27 17:00:59 2008 +0100 @@ -217,7 +217,7 @@ USBDevice *usb_tablet_init(void); USBDevice *usb_tablet_init(void); /* usb-msd.c */ -USBDevice *usb_msd_init(const char *filename); +USBDevice *usb_msd_init(const char *filename, BlockDriver *drv); /* usb.c */ void generic_usb_save(QEMUFile* f, void *opaque); diff -r 6e20e634ccd6 -r df2af4150d76 tools/ioemu/vl.c --- a/tools/ioemu/vl.c Fri Jun 27 17:00:22 2008 +0100 +++ b/tools/ioemu/vl.c Fri Jun 27 17:00:59 2008 +0100 @@ -4231,7 +4231,9 @@ static int usb_device_add(const char *de } else if (!strcmp(devname, "tablet")) { dev = usb_tablet_init(); } else if (strstart(devname, "disk:", &p)) { - dev = usb_msd_init(p); + dev = usb_msd_init(p, &bdrv_raw); + } else if (strstart(devname, "disk-qcow:", &p)) { + dev = usb_msd_init(p, 0); } else { return -1; } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |