[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [SeaBIOS] [PATCH v3 4/4] geometry: Apply LCHS values fo
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-block] [SeaBIOS] [PATCH v3 4/4] geometry: Apply LCHS values for boot devices |
Date: |
Thu, 20 Jun 2019 07:42:24 +0200 |
User-agent: |
NeoMutt/20180716 |
> +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
- [Qemu-block] [SeaBIOS] [PATCH v3 2/4] boot: Reorder functions in boot.c, (continued)
- [Qemu-block] [SeaBIOS] [PATCH v3 2/4] boot: Reorder functions in boot.c, Sam Eiderman, 2019/06/19
- [Qemu-block] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions, Sam Eiderman, 2019/06/19
- Re: [Qemu-block] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions, Kevin O'Connor, 2019/06/20
- Re: [Qemu-block] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions, Sam Eiderman, 2019/06/21
- Re: [Qemu-block] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions, Kevin O'Connor, 2019/06/21
- Re: [Qemu-block] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions, Sam Eiderman, 2019/06/22
- Re: [Qemu-block] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions, Kevin O'Connor, 2019/06/22
- Re: [Qemu-block] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions, Sam Eiderman, 2019/06/22
- Re: [Qemu-block] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions, Sam Eiderman, 2019/06/26
[Qemu-block] [SeaBIOS] [PATCH v3 4/4] geometry: Apply LCHS values for boot devices, Sam Eiderman, 2019/06/19
- Re: [Qemu-block] [SeaBIOS] [PATCH v3 4/4] geometry: Apply LCHS values for boot devices,
Gerd Hoffmann <=