mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
hd-geometry: Compute BIOS CHS translation in one place
Currently, it is split between hd_geometry_guess() and pc_cmos_init_late(). Confusing. info qtree shows the result of the former. Also confusing. Fold the part done in pc_cmos_init_late() into hd_geometry_guess(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
4e4e6e319b
commit
2adc99b277
5 changed files with 18 additions and 16 deletions
|
@ -2091,6 +2091,8 @@ void ide_init2_with_non_qdev_drives(IDEBus *bus, DriveInfo *hd0,
|
|||
trans = dinfo->trans;
|
||||
if (!cyls && !heads && !secs) {
|
||||
hd_geometry_guess(dinfo->bdrv, &cyls, &heads, &secs, &trans);
|
||||
} else if (trans == BIOS_ATA_TRANSLATION_AUTO) {
|
||||
trans = hd_bios_chs_auto_trans(cyls, heads, secs);
|
||||
}
|
||||
if (ide_init_drive(&bus->ifs[i], dinfo->bdrv,
|
||||
dinfo->media_cd ? IDE_CD : IDE_HD, NULL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue