[libvirt PATCH] conf: remove duplicated firmware type attribute

Pavel Hrdina phrdina at redhat.com
Mon Mar 29 18:20:32 UTC 2021


On Mon, Mar 29, 2021 at 07:03:52PM +0100, Daniel P. Berrangé wrote:
> The
> 
>   <os firmware='efi'>
>     <firmware type='efi'>
>       <feature enabled='no' name='enrolled-keys'/>
>     </firmware>
>   </os>
> 
> repeats the firmware attribute twice. This has no functional benefit, as
> evidenced by fact that we use a single struct field to store both
> attributes, while needlessly introducing an error scenario. The XML can
> just be simplified to:
> 
>   <os firmware='efi'>
>     <firmware>
>       <feature enabled='no' name='enrolled-keys'/>
>     </firmware>
>   </os>
> 
> which also means that we don't need to emit the empty element
> <firmware type='efi'/> for all existing configs too.

My original motivation was that if we ever need to introduce another
attribute to the <firmware> element it would be nicely grouped together.
But I guess it wound not be a big deal if we would have:

    <os firmware='efi'>
      <firmware someAttr='value'>
        <feature enabled='no' name='enrolled-keys'/>
      </firmware>
    </os>

This would look reasonable as well so

Reviewed-by: Pavel Hrdina <phrdina at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20210329/54dec1b1/attachment-0001.sig>


More information about the libvir-list mailing list