diff options
author | Markus Armbruster <armbru@redhat.com> | 2011-08-03 15:07:40 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-09-06 11:23:51 +0200 |
commit | fa879d62eb51253d00b6920ce1d1d9d261370a49 (patch) | |
tree | f83542a0ae74fe8ef0078f90098ae6aa7e02a7d6 /hw/usb-msd.c | |
parent | 648fb0ea5e9d7f32c80ec23c3ece4321403dfecd (diff) | |
download | qemu-fa879d62eb51253d00b6920ce1d1d9d261370a49.tar.gz |
block: Attach non-qdev devices as well
For now, this just protects against programming errors like having the
same drive back multiple non-qdev devices, or untimely bdrv_delete().
Later commits will add other interesting uses.
While there, rename BlockDriverState member peer to dev, bdrv_attach()
to bdrv_attach_dev(), bdrv_detach() to bdrv_detach_dev(), and
bdrv_get_attached() to bdrv_get_attached_dev().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/usb-msd.c')
-rw-r--r-- | hw/usb-msd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb-msd.c b/hw/usb-msd.c index 4072efd4b7..e92434cc94 100644 --- a/hw/usb-msd.c +++ b/hw/usb-msd.c @@ -518,7 +518,7 @@ static int usb_msd_initfn(USBDevice *dev) * * The hack is probably a bad idea. */ - bdrv_detach(bs, &s->dev.qdev); + bdrv_detach_dev(bs, &s->dev.qdev); s->conf.bs = NULL; if (!s->serial) { |