History | View | Annotate | Download (2.5 kB)
hd-geometry: Compute BIOS CHS translation in one place
Currently, it is split between hd_geometry_guess() andpc_cmos_init_late(). Confusing. info qtree shows the result of theformer. Also confusing.
Fold the part done in pc_cmos_init_late() into hd_geometry_guess()....
hw/block-common: Move BlockConf & friends from block.h
This stuff doesn't belong to block layer, and was put there onlybecause a better home didn't exist then. Now it does.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/block-common: Factor out fall back to legacy -drive serial=...
hw/block-common: Factor out fall back to legacy -drive cyls=...
block: Geometry and translation hints are now useless, purge them
There are two producers of these hints: drive_init() on behalf of-drive, and hd_geometry_guess().
The only consumer of the hint is hd_geometry_guess().
The callers of hd_geometry_guess() call it only when drive_init()...
hd-geometry: Move disk geometry guessing back from block.c
Commit f3d54fc4 factored it out of hw/ide.c for reuse. Sensible,except it was put into block.c. Device-specific functionality shouldbe kept in device code, not the block layer. Move it tohw/hd-geometry.c, and make stylistic changes required to keep...
hd-geometry: Cut out block layer translation middleman
hd_geometry_guess() picks geometry and translation. Callers can getthe geometry directly, via parameters, but for translation they needto go through the block layer.
Add a parameter for translation, so it can optionally be gotten just...
hd-geometry: Switch to uint32_t to match BlockConf
Best to use the same type, to avoid unwanted truncation or signextension.
BlockConf can't use plain int for cyls, heads and secs, becauseinteger properties require an exact width.
Signed-off-by: Markus Armbruster <armbru@redhat.com>...