qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [SeaBIOS] [PATCH v3 4/4] geometry: Apply LCHS values fo


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [SeaBIOS] [PATCH v3 4/4] geometry: Apply LCHS values for boot devices
Date: Thu, 20 Jun 2019 13:47:22 +0200
User-agent: NeoMutt/20180716

On Thu, Jun 20, 2019 at 11:52:01AM +0300, Sam Eiderman wrote:
> 
> 
> > On 20 Jun 2019, at 8:42, Gerd Hoffmann <address@hidden> wrote:
> > 
> >> +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.
> 
> TRANSLATION_HOST?
> 
> > 
> >> +        desc = "overriden";
> > 
> > I'd name that "host-supplied" or "fw-cfg”.
> 
> “host-supplied”?
> 
> > 
> >> +        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.
> 
> Sounds reasonable.
> I’ll rename to host_lchs_supplied()?
> 
> WDYT?

looks all good to me.

cheers,
  Gerd




reply via email to

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