summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/block/hd-geometry.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/block/hd-geometry.c b/hw/block/hd-geometry.c
index 112094358e..dae13ab14d 100644
--- a/hw/block/hd-geometry.c
+++ b/hw/block/hd-geometry.c
@@ -150,7 +150,12 @@ void hd_geometry_guess(BlockBackend *blk,
translation = BIOS_ATA_TRANSLATION_NONE;
}
if (ptrans) {
- *ptrans = translation;
+ if (*ptrans == BIOS_ATA_TRANSLATION_AUTO) {
+ *ptrans = translation;
+ } else {
+ /* Defer to the translation specified by the user. */
+ translation = *ptrans;
+ }
}
trace_hd_geometry_guess(blk, *pcyls, *pheads, *psecs, translation);
}