fdc: add function to determine drive chs limits
commite08fde0c5ee4e7f3ec319a44b846fb9e127c1db2
authorRoman Kagan <rkagan@virtuozzo.com>
Wed, 17 Feb 2016 18:25:32 +0000 (17 21:25 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 11 Mar 2016 12:55:15 +0000 (11 14:55 +0200)
tree0e0e5b23dd7fd165cdb5e9b8f5ad125c38891e33
parentbda055096be9a91d602af457f8bedeede86eb3f6
fdc: add function to determine drive chs limits

When populating ACPI objects for floppy drives one needs to provide the
maximum values for cylinder, sector, and head number the drive supports.

This patch adds a function that iterates through the array of predefined
floppy drive formats and returns the maximum values of c, h, s, out of
those matching the given floppy drive type.

Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Cc: John Snow <jsnow@redhat.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Kevin O'Connor <kevin@koconnor.net>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
hw/block/fdc.c
include/hw/block/fdc.h