aboutsummaryrefslogtreecommitdiff
path: root/tests/fdc-test.c
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2016-01-22 15:51:03 -0500
committerJohn Snow <jsnow@redhat.com>2016-01-25 14:35:24 -0500
commitf31937aa8cc144f8196de91be6ec81390da92b1e (patch)
tree658cb8f204bd55d1424d0602f26101465c947cba /tests/fdc-test.c
parent109c17bc208c09a72d9c6c237f3f7b84c6ac91a4 (diff)
fdc: rework pick_geometry
This one is the crazy one. fd_revalidate currently uses pick_geometry to tell if the diskette geometry has changed upon an eject/insert event, but it won't allow us to insert a 1.44MB diskette into a 2.88MB drive. This is inflexible. The new algorithm applies a new heuristic to guessing disk geometries that allows us to switch diskette types as long as the physical size matches before falling back to the old heuristic. The old one is roughly: - If the size (sectors) and type matches, choose it. - Fall back to the first geometry that matched our type. The new one is: - If the size (sectors) and type matches, choose it. - If the size (sectors) and physical size match, choose it. - Fall back to the first geometry that matched our type. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1453495865-9649-11-git-send-email-jsnow@redhat.com
Diffstat (limited to 'tests/fdc-test.c')
0 files changed, 0 insertions, 0 deletions