summaryrefslogtreecommitdiffstats
path: root/hw/ide/core.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2012-07-10 11:12:38 +0200
committerKevin Wolf <kwolf@redhat.com>2012-07-17 16:48:30 +0200
commit9139046c16688615023f35668660f6d3947a05d6 (patch)
tree8575e068894f580ccf7c48ee34fcb46df5d9dc75 /hw/ide/core.c
parente2f3dc2b6a205cf969ba5d1307293db17fd9621f (diff)
downloadhqemu-9139046c16688615023f35668660f6d3947a05d6.zip
hqemu-9139046c16688615023f35668660f6d3947a05d6.tar.gz
ide pc: Cut out the block layer geometry middleman
PC BIOS setup needs IDE geometry information. Get it directly from the device model rather than through the block layer. In preparation of purging geometry from the block layer, which will happen later in this series. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/core.c')
-rw-r--r--hw/ide/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 28f04ad..7f5ad07 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -1934,7 +1934,7 @@ int ide_init_drive(IDEState *s, BlockDriverState *bs, IDEDriveKind kind,
s->drive_kind = kind;
bdrv_get_geometry(bs, &nb_sectors);
- hd_geometry_guess(bs, &cylinders, &heads, &secs, NULL);
+ hd_geometry_guess(bs, &cylinders, &heads, &secs, &s->chs_trans);
if (cylinders < 1 || cylinders > 16383) {
error_report("cyls must be between 1 and 16383");
return -1;
OpenPOWER on IntegriCloud