[gnome-boxes] installer-media: Add supports_virtio1_{disk,net}



commit 9e4245cc209ba0b1b998e23b0e0a0c683f95d663
Author: Fabiano FidĂȘncio <fidencio redhat com>
Date:   Thu Oct 11 13:16:34 2018 +0200

    installer-media: Add supports_virtio1_{disk,net}
    
    These new two methods become handy in order to differentiate whether an
    OS supports virtio, virtio1.0 or both, which is something needed from
    the moment we start using q35 as the default machine type for Boxes'
    VMs.
    
    Related: https://bugzilla.redhat.com/show_bug.cgi?id=1581422
    
    Signed-off-by: Fabiano FidĂȘncio <fidencio redhat com>

 src/installer-media.vala | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/src/installer-media.vala b/src/installer-media.vala
index feb5d7be..b29c10b8 100644
--- a/src/installer-media.vala
+++ b/src/installer-media.vala
@@ -25,12 +25,24 @@
     public virtual bool need_user_input_for_vm_creation { get { return false; } }
     public virtual bool ready_to_create { get { return true; } }
 
+    public bool supports_virtio1_disk {
+        get {
+            return (find_device_by_prop (supported_devices, DEVICE_PROP_NAME, "virtio1.0-block") != null);
+        }
+    }
+
     public bool supports_virtio_disk {
         get {
             return (find_device_by_prop (supported_devices, DEVICE_PROP_NAME, "virtio-block") != null);
         }
     }
 
+    public bool supports_virtio1_net {
+        get {
+            return (find_device_by_prop (supported_devices, DEVICE_PROP_NAME, "virtio1.0-net") != null);
+        }
+    }
+
     public bool supports_virtio_net {
         get {
             return (find_device_by_prop (supported_devices, DEVICE_PROP_NAME, "virtio-net") != null);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]