> On 20 Jun 2019, at 8:42, Gerd Hoffmann <[email protected]> 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? > > The other patches look all sane to me. > > cheers, > Gerd >
- [Qemu-block] [SeaBIOS] [PATCH v3 0/4] Add Qemu to SeaBIOS L... Sam Eiderman
- [Qemu-block] [SeaBIOS] [PATCH v3 1/4] geometry: Read L... Sam Eiderman
- [Qemu-block] [SeaBIOS] [PATCH v3 2/4] boot: Reorder fu... Sam Eiderman
- [Qemu-block] [SeaBIOS] [PATCH v3 4/4] geometry: Apply ... Sam Eiderman
- Re: [Qemu-block] [SeaBIOS] [PATCH v3 4/4] geometry... Gerd Hoffmann
- Re: [Qemu-block] [SeaBIOS] [PATCH v3 4/4] geom... Sam Eiderman
- Re: [Qemu-block] [SeaBIOS] [PATCH v3 4/4] ... Gerd Hoffmann
- [Qemu-block] [SeaBIOS] [PATCH v3 3/4] geometry: Add bo... Sam Eiderman
- Re: [Qemu-block] [SeaBIOS] [PATCH v3 3/4] geometry... Kevin O'Connor
- Re: [Qemu-block] [SeaBIOS] [PATCH v3 3/4] geom... Sam Eiderman
- Re: [Qemu-block] [SeaBIOS] [PATCH v3 3/4] ... Kevin O'Connor
- Re: [Qemu-block] [SeaBIOS] [PATCH v3 ... Sam Eiderman
- Re: [Qemu-block] [SeaBIOS] [PATCH... Kevin O'Connor
- Re: [Qemu-block] [SeaBIOS] [P... Sam Eiderman
- Re: [Qemu-block] [SeaBIOS] [P... Sam Eiderman
