aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-08-03 15:08:07 +0200
committerKevin Wolf <kwolf@redhat.com>2011-09-06 11:24:06 +0200
commitbe32f75f4dfb4e7dead9fb9cfb8a7195b1e25ebf (patch)
tree97a4da9fa1163b0928012a4900283a1d84fa6259 /block
parent656fbeff92f402d6dd21a048f5e9028a32fcfd40 (diff)
downloadqemu-be32f75f4dfb4e7dead9fb9cfb8a7195b1e25ebf.zip
qemu-be32f75f4dfb4e7dead9fb9cfb8a7195b1e25ebf.tar.gz
qemu-be32f75f4dfb4e7dead9fb9cfb8a7195b1e25ebf.tar.bz2
block/raw: Fix to forward method bdrv_media_changed()
Block driver "raw" forwards most methods to the underlying block driver. However, it doesn't implement method bdrv_media_changed(). Makes bdrv_media_changed() always return -ENOTSUP. I believe -fda /dev/fd0 gives you raw over host_floppy, and disk change detection (fdc register 7 bit 7) is broken. Testing my theory requires a computer museum, though. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/raw.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/block/raw.c b/block/raw.c
index 555db4f..f197479 100644
--- a/block/raw.c
+++ b/block/raw.c
@@ -75,6 +75,11 @@ static int raw_is_inserted(BlockDriverState *bs)
return bdrv_is_inserted(bs->file);
}
+static int raw_media_changed(BlockDriverState *bs)
+{
+ return bdrv_media_changed(bs->file);
+}
+
static void raw_eject(BlockDriverState *bs, int eject_flag)
{
bdrv_eject(bs->file, eject_flag);
@@ -137,8 +142,10 @@ static BlockDriver bdrv_raw = {
.bdrv_discard = raw_discard,
.bdrv_is_inserted = raw_is_inserted,
+ .bdrv_media_changed = raw_media_changed,
.bdrv_eject = raw_eject,
.bdrv_set_locked = raw_set_locked,
+
.bdrv_ioctl = raw_ioctl,
.bdrv_aio_ioctl = raw_aio_ioctl,