summaryrefslogtreecommitdiff
path: root/hw/ide/piix.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ide/piix.c')
-rw-r--r--hw/ide/piix.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index b9cdcd6b75..88d318127c 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -27,7 +27,6 @@
#include <hw/pci.h>
#include <hw/isa.h>
#include "block.h"
-#include "block_int.h"
#include "sysemu.h"
#include "dma.h"
@@ -176,7 +175,7 @@ static int pci_piix3_xen_ide_unplug(DeviceState *dev)
for (; i < 3; i++) {
di = drive_get_by_index(IF_IDE, i);
- if (di != NULL && di->bdrv != NULL && !di->bdrv->removable) {
+ if (di != NULL && !di->media_cd) {
DeviceState *ds = bdrv_get_attached_dev(di->bdrv);
if (ds) {
bdrv_detach_dev(di->bdrv, ds);