From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0FIX-0000O2-6H for qemu-devel@nongnu.org; Wed, 03 Jun 2015 16:30:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0FIW-00071o-3E for qemu-devel@nongnu.org; Wed, 03 Jun 2015 16:30:01 -0400 Message-ID: <556F63C0.4030804@redhat.com> Date: Wed, 03 Jun 2015 14:29:52 -0600 From: Eric Blake MIME-Version: 1.0 References: <1433360659-1915-1-git-send-email-mreitz@redhat.com> <1433360659-1915-10-git-send-email-mreitz@redhat.com> In-Reply-To: <1433360659-1915-10-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cfO6vOFsinNI6nScwwgRN59uG322ebLL6" Subject: Re: [Qemu-devel] [PATCH v3 09/38] hw/block/fdc: Implement tray status List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org Cc: Kevin Wolf , John Snow , qemu-devel@nongnu.org, Stefan Hajnoczi , Markus Armbruster This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --cfO6vOFsinNI6nScwwgRN59uG322ebLL6 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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").= >=20 > This results in the tray being reported as open if qemu has been starte= d > with the default floppy drive, which breaks some tests. Fix them. >=20 > Signed-off-by: Max Reitz > --- > 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(-) >=20 > 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 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --cfO6vOFsinNI6nScwwgRN59uG322ebLL6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVb2PAAAoJEKeha0olJ0NqyU0H/170f1O0H0A1HTM9xOwFrq1u dsC4k3EyZjCY9QF5lHvW0JlGl4e+NBiWwyrmbjpyhevmwJ+ndPIMkiV/0lztVCOu K6+NaK1gR39ZbxPtfmZjADANme2HCyaD0F9OnOKUnM+MShTSlL0Bph7uCYAiJt9/ sFGNF/mXhGlfwYSgUn7d6Lkp62Nes65PXzac5nU79Oy0CSMKLteZJNo/UrKyME0G BD3wKSx2y5KhyJLhbBVvc12o5lekmNpoA7qmAdWaAaFZ8HdnDw6MGSdvsh0MZ/VN EUrRmL2eQRUHX28sp8s5VBRfR+qh3jBW5M/7tCNUwrflLAkSfEEpVOIABOq6yt4= =IHJj -----END PGP SIGNATURE----- --cfO6vOFsinNI6nScwwgRN59uG322ebLL6--