> +static int
> +overriden_lchs_supplied(struct drive_s *drive)
> +{
> +    return drive->lchs.cylinder || drive->lchs.head || drive->lchs.sector;
> +}

> +    case TRANSLATION_MACHINE:

Hmm, why this name?  Doesn't look intuitive to me.

> +        desc = "overriden";

I'd name that "host-supplied" or "fw-cfg".

> +        cylinders = drive->lchs.cylinder;
> +        heads = drive->lchs.head;
> +        if (heads > 255)
> +            heads = 255;

I suggest to move these sanity checks to overriden_lchs_supplied(), then
ignore the override altogether when heads or sectors is out of range
instead of trying to fixup things.

The other patches look all sane to me.

cheers,
  Gerd


Reply via email to