[gnome-boxes] unattended-file: Remove unneeded virtual UnattendedFile::disk_file



commit 39d6854758916ae817db12b43c396c0390e01bcd
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Mon Feb 18 14:36:09 2019 +0100

    unattended-file: Remove unneeded virtual UnattendedFile::disk_file
    
    It was added because we want to use a different path for initrds than
    for other injection methods. However, after the previous commit, copying
    files to initrd is handled directly in UnattendedFileScript rather than
    using the generic UnattendedFile implementation. This means we no longer
    needs this vfunc in order to let the generic code use the correct path.
    
    Reviewed-by: Fabiano FidĂȘncio <fidencio redhat com>

 src/unattended-file.vala | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
---
diff --git a/src/unattended-file.vala b/src/unattended-file.vala
index 56a6608d..9ae6ab94 100644
--- a/src/unattended-file.vala
+++ b/src/unattended-file.vala
@@ -6,7 +6,7 @@
     public abstract string src_path { get; set; }
     public abstract string dest_name { get; set; }
 
-    protected virtual string disk_file {
+    protected string disk_file {
         owned get {
             return installer.disk_file.get_path ();
         }
@@ -105,20 +105,6 @@ protected async File get_source_file (Cancellable? cancellable)  throws GLib.Err
     public string src_path { get; set; }
     public InstallScriptInjectionMethod injection_method { get; set; }
 
-    protected string disk_file {
-        owned get {
-            switch (injection_method) {
-            case InstallScriptInjectionMethod.DISK:
-            case InstallScriptInjectionMethod.FLOPPY:
-                return installer.disk_file.get_path ();
-            case InstallScriptInjectionMethod.INITRD:
-                return installer.initrd_file.get_path ();
-            default:
-                assert_not_reached ();
-            }
-        }
-    }
-
     protected UnattendedInstaller installer { get; set; }
     protected InstallScript script { get; set; }
 


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