summaryrefslogtreecommitdiff
path: root/hw/fdc.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2012-06-29 17:34:23 +0200
committerKevin Wolf <kwolf@redhat.com>2012-07-09 15:53:03 +0200
commit1f69c2b022710222ff0379678e49f8bfb6c91233 (patch)
tree2bacd730b0a805215b2315937accd465d04762a0 /hw/fdc.c
parentb3ce604eeaa77970fa53838e7df2bc85344f2554 (diff)
downloadqemu-1f69c2b022710222ff0379678e49f8bfb6c91233.tar.gz
fdc: Drop broken code for user-defined floppy geometry
bdrv_get_floppy_geometry_hint() fails to store through its parameter drive when bs has a geometry hint. Makes fd_revalidate() assign random crap to drv->drive. Has been broken that way for ages. Harmless, because: * The only way to set a geometry hint is -drive if=none,cyls=... Since commit c219331e, probably unintentional. * The only use of drv->drive is as argument to another bdrv_get_floppy_geometry_hint(). Which doesn't use it, since the geometry hint is still there. Drop the broken code, ignore -drive parameter cyls, heads and secs for floppies even with if=none, just like before commit c219331e. Matches -help, which explains cyls, heads, secs as "hard disk physical geometry". Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/fdc.c')
-rw-r--r--hw/fdc.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/hw/fdc.c b/hw/fdc.c
index e28841c170..edf07063b2 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -191,9 +191,6 @@ static void fd_revalidate(FDrive *drv)
&last_sect, drv->drive, &drive, &rate);
if (!bdrv_is_inserted(drv->bs)) {
FLOPPY_DPRINTF("No disk in drive\n");
- } else if (nb_heads != 0 && max_track != 0 && last_sect != 0) {
- FLOPPY_DPRINTF("User defined disk (%d %d %d)\n",
- nb_heads - 1, max_track, last_sect);
} else {
FLOPPY_DPRINTF("Floppy disk (%d h %d t %d s) %s\n", nb_heads,
max_track, last_sect, ro ? "ro" : "rw");