diff options
| author | Anthony Liguori <aliguori@us.ibm.com> | 2011-09-08 09:05:14 -0500 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-09-08 09:05:14 -0500 |
| commit | 220724ca4ada4e30bcfff326b62822a69c23e181 (patch) | |
| tree | c0bb1bdd3ec41c5945000cf43620725d2e00ffd8 /blockdev.c | |
| parent | d8ac46d950451a722fd6b1d5d0768c72bee87d47 (diff) | |
| parent | cfc606da0ddcef1f7228317b9f7dfa6c94c6c64f (diff) | |
| download | focaccia-qemu-220724ca4ada4e30bcfff326b62822a69c23e181.tar.gz focaccia-qemu-220724ca4ada4e30bcfff326b62822a69c23e181.zip | |
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Diffstat (limited to 'blockdev.c')
| -rw-r--r-- | blockdev.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/blockdev.c b/blockdev.c index 2602591bf6..049dda5549 100644 --- a/blockdev.c +++ b/blockdev.c @@ -14,7 +14,6 @@ #include "qemu-option.h" #include "qemu-config.h" #include "sysemu.h" -#include "hw/qdev.h" #include "block_int.h" static QTAILQ_HEAD(drivelist, DriveInfo) drives = QTAILQ_HEAD_INITIALIZER(drives); @@ -738,12 +737,12 @@ int do_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data) bdrv_flush(bs); bdrv_close(bs); - /* if we have a device associated with this BlockDriverState (bs->peer) + /* if we have a device attached to this BlockDriverState * then we need to make the drive anonymous until the device * can be removed. If this is a drive with no device backing * then we can just get rid of the block driver state right here. */ - if (bs->peer) { + if (bdrv_get_attached_dev(bs)) { bdrv_make_anon(bs); } else { drive_uninit(drive_get_by_blockdev(bs)); |