]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
fdc: take side count into account
authorHervé Poussineau <hpoussin@reactos.org>
Mon, 6 Feb 2012 21:29:02 +0000 (22:29 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 29 Feb 2012 11:48:46 +0000 (12:48 +0100)
commit08388273a3c4e895bf7e10f356f66c2363cfe90b
treed1315f7ac981656f4e23cb001348588da160a789
parentb55c952aea6de024bf1a06357b49367fba045443
fdc: take side count into account

Floppies can be simple or double-sided. However, current code
was only taking the common case into account (ie 2 sides).

This repairs single-sided floppies, which where totally broken
before this patch : for track > 0, wrong sector number was
calculated, and data was read/written at wrong place on
underlying device.

Fortunately, only some 360 kB floppies are single-sided, so
this bug was probably not seen much.

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/fdc.c