But maybe someone wants bootorder but doesn’t want to override legacy disk 
translations…

I’m thinking of maybe adding

if (!CONFIG_BOOTORDER || !CONFIG_BIOS_GEOMETRY)
    return NULL;

In each of the get_*_devpath functions (which will normally return an allocated 
string, not on stack).

Another approach can be make CONFIG_BIOS_GEOMETRY depend on CONFIG_BOOTORDER.
Then we should only keep:

if (!CONFIG_BOOTORDER)
    return NULL;

In the get_*_devpath functions.

I think the first approach will look better when reading the code - will not 
require the reader to
analize dependancies in the Kconfig file.

Sam


> On 21 Jun 2019, at 21:59, Kevin O'Connor <ke...@koconnor.net> wrote:
> 
> On Fri, Jun 21, 2019 at 08:42:28PM +0300, Sam Eiderman wrote:
>> Sounds reasonable, how do purpose to deal with:
>> 
>> config BIOS_GEOMETRY
>> config BOOTORDER
>> 
>> precompiler optouts?
> 
> I think you can stick them both under BOOTORDER.  That option is only
> there in case someone wants to reduce the size of the SeaBIOS binary.
> I can't think of a reasonable situation where one cares that much
> about binary size, yet wants to override legacy disk translations..
> 
>> If we don’t need any of them we also don’t need to call “get_scsi_devpath", 
>> “get_ata_devpath”, “get_pci_dev_path”.
>> 
>> I’ll see what can be done. 
> 
> Thanks.
> -Kevin


Reply via email to