virt-manager/SOURCES/virt-manager-details-Fix-showing-the-firmware-type-in-case-of-firmware-auto-selection.patch

50 lines
1.6 KiB
Diff
Raw Normal View History

2021-05-18 06:47:26 +00:00
From d3d7b75a5926059733871a90c106be8190e166a9 Mon Sep 17 00:00:00 2001
Message-Id: <d3d7b75a5926059733871a90c106be8190e166a9@dist-git>
From: Pavel Hrdina <phrdina@redhat.com>
Date: Wed, 15 Jan 2020 10:34:12 +0800
Subject: [PATCH] details: Fix showing the firmware type in case of firmware
auto selection
From: Lin Ma <lma@suse.com>
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.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Lin Ma <lma@suse.com>
(cherry picked from commit 15a9502b7b7a263c4d66ff2b3f31c209f58fe0b4)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1857069
Signed-off-by: Pavel Hrdina <phrdina@redhat.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 51d170e9..7b0a501f 100644
--- a/virtManager/details/details.py
+++ b/virtManager/details/details.py
@@ -2017,8 +2017,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)
--
2.26.2