[virt-tools-list] [virt-manager PATCH v2] details: Fix showing the firmware type in case of firmware auto selection

Cole Robinson crobinso at redhat.com
Wed Jan 15 15:26:15 UTC 2020


On 1/14/20 9:34 PM, Lin Ma wrote:
> For a shutoff VM, If user select uefi firmware auto selection, e.g.
> <os firmware='efi'>
> ...
> </os>
> 
> Its firmware information is set to 'BIOS' in details, This is incorrect.
> This fixes it.
> 
> Signed-off-by: Lin Ma <lma at suse.com>
> ---
>  virtManager/details/details.py | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/virtManager/details/details.py b/virtManager/details/details.py
> index dc42e35f..339924ff 100644
> --- a/virtManager/details/details.py
> +++ b/virtManager/details/details.py
> @@ -2027,8 +2027,11 @@ class vmmDetails(vmmGObjectUI):
>  
>          # Firmware
>          domcaps = self.vm.get_domain_capabilities()
> -        firmware = domcaps.label_for_firmware_path(
> -            self.vm.get_xmlobj().os.loader)
> +        if self.vm.get_xmlobj().is_uefi():
> +            firmware = 'UEFI'
> +        else:
> +            firmware = domcaps.label_for_firmware_path(
> +                self.vm.get_xmlobj().os.loader)
>          if self.widget("overview-firmware").is_visible():
>              uiutil.set_list_selection(
>                  self.widget("overview-firmware"), firmware)
> 

Reviewed-by: Cole Robinson <crobinso at redhat.com>

and pushed

Thanks,
Cole




More information about the virt-tools-list mailing list