aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-10-26 15:56:49 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-30 08:39:31 -0500
commitb3e461d3d6426db74870cd2f54fc24af336660e9 (patch)
tree540c6d50f963a68cca93b78ab57de14774a51832 /vl.c
parent61e094c049c1f58291e596910d300c7842cfd998 (diff)
usb-storage: use qdev for -usbdevice
Hook up usb_msd_init. Also rework handling of encrypted block devices, move the code out vl.c. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/vl.c b/vl.c
index 2da856da82..e57f58fea0 100644
--- a/vl.c
+++ b/vl.c
@@ -2517,16 +2517,6 @@ static void smp_parse(const char *optarg)
/***********************************************************/
/* USB devices */
-static void usb_msd_password_cb(void *opaque, int err)
-{
- USBDevice *dev = opaque;
-
- if (!err)
- usb_device_attach(dev);
- else
- dev->info->handle_destroy(dev);
-}
-
static int usb_device_add(const char *devname, int is_hotplug)
{
const char *p;
@@ -2543,21 +2533,6 @@ static int usb_device_add(const char *devname, int is_hotplug)
/* the other ones */
if (strstart(devname, "host:", &p)) {
dev = usb_host_device_open(p);
- } else if (strstart(devname, "disk:", &p)) {
- BlockDriverState *bs;
-
- dev = usb_msd_init(p);
- if (!dev)
- return -1;
- bs = usb_msd_get_bdrv(dev);
- if (bdrv_key_required(bs)) {
- autostart = 0;
- if (is_hotplug) {
- monitor_read_bdrv_key_start(cur_mon, bs, usb_msd_password_cb,
- dev);
- return 0;
- }
- }
} else if (strstart(devname, "net:", &p)) {
QemuOpts *opts;
int idx;