[gnome-boxes] unattended-installer: Expand the check for virtio devices



commit 17b4153f7b8b1bdb430cd936db076c8f68389a5b
Author: Fabiano FidĂȘncio <fidencio redhat com>
Date:   Fri Oct 12 09:08:48 2018 +0200

    unattended-installer: Expand the check for virtio devices
    
    Although it's not a common case for an OS to have support for virtio1 but
    not support virtio, let's expand the check for the safety sake.
    
    Related: https://bugzilla.redhat.com/show_bug.cgi?id=1581422
    
    Signed-off-by: Fabiano FidĂȘncio <fidencio redhat com>

 src/unattended-installer.vala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala
index 4e0ba23e..6a37e208 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -232,7 +232,7 @@ public void configure_install_script (InstallScript script) {
         if (os.distro == "win")
             config.set_target_disk ("C");
         else
-            config.set_target_disk (supports_virtio_disk? "/dev/vda" : "/dev/sda");
+            config.set_target_disk (supports_virtio_disk || supports_virtio1_disk? "/dev/vda" : "/dev/sda");
 
         var disk_config = get_unattended_disk_config (script.path_format);
         var device_path = device_name_to_path (script.path_format, disk_config.get_target_dev ());
@@ -360,7 +360,7 @@ public override async bool prepare (ActivityProgress progress = new ActivityProg
             disk.set_target_bus (DomainDiskBus.FDC);
         } else {
             // Path format checks below are most probably practically redundant but a small price for future 
safety
-            if (supports_virtio_disk)
+            if (supports_virtio_disk || supports_virtio1_disk)
                 disk.set_target_dev ((path_format == PathFormat.UNIX)? "sda" : "E");
             else
                 disk.set_target_dev ((path_format == PathFormat.UNIX)? "sdb" : "E");


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