[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 09/38] hw/block/fdc: Implement tray status
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3 09/38] hw/block/fdc: Implement tray status |
Date: |
Wed, 03 Jun 2015 14:29:52 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 06/03/2015 01:43 PM, Max Reitz wrote:
> The tray of an FDD is open iff there is no medium inserted (there are
> only two states for an FDD: "medium inserted" or "no medium inserted").
>
> This results in the tray being reported as open if qemu has been started
> with the default floppy drive, which breaks some tests. Fix them.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> hw/block/fdc.c | 20 ++++++++++++----
> tests/fdc-test.c | 4 +---
> tests/qemu-iotests/067.out | 60
> +++++++---------------------------------------
> tests/qemu-iotests/071.out | 2 --
> tests/qemu-iotests/081.out | 1 -
> tests/qemu-iotests/087.out | 6 -----
> 6 files changed, 25 insertions(+), 68 deletions(-)
>
> diff --git a/hw/block/fdc.c b/hw/block/fdc.c
> index d8a8edd..04b6dc0 100644
> --- a/hw/block/fdc.c
> +++ b/hw/block/fdc.c
> @@ -192,6 +192,8 @@ typedef struct FDrive {
> uint8_t ro; /* Is read-only */
> uint8_t media_changed; /* Is media changed */
> uint8_t media_rate; /* Data rate of medium */
> +
> + bool media_inserted; /* Is there a medium in the tray */
Might be nice to someday convert ro and media_changed to bool, but does
not have to be this series.
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v3 08/38] block: Invoke change media CB before NULLing drv, (continued)
- [Qemu-devel] [PATCH v3 08/38] block: Invoke change media CB before NULLing drv, Max Reitz, 2015/06/03
- [Qemu-devel] [PATCH v3 07/38] block/quorum: Implement bdrv_is_inserted(), Max Reitz, 2015/06/03
- [Qemu-devel] [PATCH v3 10/38] hw/usb-storage: Check whether BB is inserted, Max Reitz, 2015/06/03
- [Qemu-devel] [PATCH v3 09/38] hw/block/fdc: Implement tray status, Max Reitz, 2015/06/03
- Re: [Qemu-devel] [PATCH v3 09/38] hw/block/fdc: Implement tray status,
Eric Blake <=
- [Qemu-devel] [PATCH v3 11/38] block: Fix BB AIOCB AioContext without BDS, Max Reitz, 2015/06/03
- [Qemu-devel] [PATCH v3 12/38] block: Move guest_block_size into BlockBackend, Max Reitz, 2015/06/03
- [Qemu-devel] [PATCH v3 13/38] block: Remove wr_highest_sector from BlockAcctStats, Max Reitz, 2015/06/03
- [Qemu-devel] [PATCH v3 14/38] block: Move BlockAcctStats into BlockBackend, Max Reitz, 2015/06/03