[gnome-boxes] Mark the express install floppy image as optional



commit 986b0a21bcd5254da39e623c4112969139cb4489
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon May 7 18:19:07 2012 +0300

    Mark the express install floppy image as optional
    
    We store the floppy disk image in cache because its temporary and
    deletion after installation shouldn't affect VM startup.
    
    The ideal solution would be to automatically remove the floppy after
    installation but thats not as trivial as it sounds since some OSs need
    express install data after (e.g during first-boot setup).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=675617

 src/vm-configurator.vala |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
index 079171c..0325ffe 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -92,8 +92,11 @@ private class Boxes.VMConfigurator {
             if (!(device is DomainDisk))
                 continue;
 
+            // The ideal solution would be to automatically remove the floppy after installation but thats not as
+            // trivial as it sounds since some OSs need express install data after (e.g during first-boot setup).
             var disk = device as DomainDisk;
-            if (disk.get_guest_device_type () == DomainDiskGuestDeviceType.CDROM)
+            var disk_type = disk.get_guest_device_type ();
+            if (disk_type == DomainDiskGuestDeviceType.CDROM || disk_type == DomainDiskGuestDeviceType.FLOPPY)
                 disk.set_startup_policy (DomainDiskStartupPolicy.OPTIONAL);
         }
 



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