[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 16/31] xen: Clean up pci_piix3_xen_ide_unplug()'s te
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 16/31] xen: Clean up pci_piix3_xen_ide_unplug()'s test for "not a CD" |
Date: |
Tue, 6 Sep 2011 17:39:31 +0200 |
From: Markus Armbruster <address@hidden>
pci_piix3_xen_ide_unplug() unplugs only disks, not CD-ROMs. It peeks
into the DriveInfo's BlockDriverState to distinguish between the two.
Unclean; use DriveInfo member media_cd, like xen_config_dev_blk().
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
hw/ide/piix.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index b9cdcd6..88d3181 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);
--
1.7.6
- [Qemu-devel] [PATCH 11/31] block/raw: Fix to forward method bdrv_media_changed(), (continued)
- [Qemu-devel] [PATCH 11/31] block/raw: Fix to forward method bdrv_media_changed(), Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 10/31] ide: Give vmstate structs internal linkage where possible, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 17/31] spitz tosa: Simplify "drive is suitable for microdrive" test, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 12/31] block: Leave tracking media change to device models, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 14/31] block: Clean up bdrv_flush_all(), Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 13/31] fdc: Make media change detection more robust, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 15/31] savevm: Include writable devices with removable media, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 20/31] VMDK: add twoGbMaxExtentSparse support, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 16/31] xen: Clean up pci_piix3_xen_ide_unplug()'s test for "not a CD",
Kevin Wolf <=
- [Qemu-devel] [PATCH 22/31] VMDK: Opening compressed extent., Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 23/31] VMDK: read/write compressed extent, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 21/31] VMDK: separate vmdk_read_extent/vmdk_write_extent, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 19/31] VMDK: enable twoGbMaxExtentFlat, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 25/31] VMDK: bugfix, open Haiku vmdk image, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 24/31] VMDK: creating streamOptimized subformat, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 18/31] block: Declare qemu_blockalign() in block.h, not block_int.h, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 29/31] scsi: refine constants for READ CAPACITY 16, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 26/31] VMDK: bugfix, opening vSphere 4 exported image, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 31/31] scsi: improve MODE SENSE emulation, Kevin Wolf, 2011/09/06