[gnome-boxes] installer-media: Add supports_efi() method
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] installer-media: Add supports_efi() method
- Date: Fri, 4 Oct 2019 13:22:21 +0000 (UTC)
commit a391cb9a4e82b3251be8c62ac5e0b6cc301df204
Author: Fabiano FidĂȘncio <fidencio redhat com>
Date: Mon Aug 26 20:11:22 2019 +0300
installer-media: Add supports_efi() method
supports_efi() method checks whether the OS to be installed supports
UEFI or not.
The information about the UEFI support comes from osinfo-db.
https://gitlab.gnome.org/GNOME/gnome-boxes/issues/199
Signed-off-by: Fabiano FidĂȘncio <fidencio redhat com>
src/installer-media.vala | 14 ++++++++++++++
1 file changed, 14 insertions(+)
---
diff --git a/src/installer-media.vala b/src/installer-media.vala
index dd66c8a9..db3e2480 100644
--- a/src/installer-media.vala
+++ b/src/installer-media.vala
@@ -55,6 +55,20 @@
}
}
+ public bool supports_efi {
+ get {
+ if (os == null)
+ return false;
+
+ foreach (var iter in os.get_firmware_list (null) .get_elements ()) {
+ var firmware = iter as Firmware;
+ if (firmware.get_firmware_type () == "efi")
+ return true;
+ }
+ return false;
+ }
+ }
+
public bool prefers_q35 {
get {
if (os == null)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]