On 21/12/2016 14:59, Igor Mammedov wrote:
>> Apparently a misunderstanding of the underlying command line handling
>> mechanics.
>>
>>> Also this patch would break build for targets that don't link smbios.c
>>> (i.e. which don't have CONFIG_SMBIOS=y)  
>> 
>> Ah, I hadn't spotted that - apologies.
> 
> Just do 1 build for all targets before posting patches to avoid
> such kind of errors.
> 
>> So a simpler, and more correct fix would rather be to change the
>> #ifdef TARGET_I386
>> in arch_init.c to
>> #ifdef CONFIG_SMBIOS
> 
> it looks better to me than enumerating targets explicitly,
> CCing Paolo for another opinion

I don't think CONFIG_SMBIOS is visible from C, is it?

However, the solution is to:

1) add a smbios-stub.c file to hw/smbios, containing a dummy
implementation of smbios_entry_add.  For the Makefile magic see
hw/pci/Makefile.objs.

2) add an Error * argument to smbios_entry_add, and make the stub
version fail

3) remove do_smbios_option altogether, and make vl.c call
smbios_entry_add directly.

Paolo

Reply via email to