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>
This commit is contained in:
parent
656fbeff92
commit
be32f75f4d
@ -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,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user