qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] geometry: fix i386 compilation


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] geometry: fix i386 compilation
Date: Fri, 28 Nov 2014 11:47:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Ekaterina Tumanova <address@hidden> writes:

> Signed-off-by: Ekaterina Tumanova <address@hidden>
> ---
>  hw/block/hd-geometry.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/hw/block/hd-geometry.c b/hw/block/hd-geometry.c
> index b462225..905d2c6 100644
> --- a/hw/block/hd-geometry.c
> +++ b/hw/block/hd-geometry.c
> @@ -147,7 +147,8 @@ void hd_geometry_guess(BlockBackend *blk,
>                         uint32_t *pcyls, uint32_t *pheads, uint32_t *psecs,
>                         int *ptrans)
>  {
> -    int cylinders, heads, secs, translation;
> +    uint32_t cylinders, heads, secs;
> +    int translation = BIOS_ATA_TRANSLATION_NONE;
>      struct ProbeGeometry geometry = blk_probe_geometry(blk);
>  
>      if (geometry.rc == 0) {
> @@ -173,9 +174,6 @@ void hd_geometry_guess(BlockBackend *blk,
>          *pcyls = cylinders;
>          *pheads = heads;
>          *psecs = secs;
> -        /* disable any translation to be in sync with
> -           the logical geometry */
> -        translation = BIOS_ATA_TRANSLATION_NONE;
>      }

Actually broken in PATCH 5, so it needs to be fixed there, and not in
PATCH 6 (which this one fixes up).

Moreover, your fixup makes the code less clear.  Please add the missing
translation = ... instead.

>  done:
>      if (ptrans) {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]