[gnome-boxes] fedora: Remove redundant members



commit 2e998fad6c6c25e921f8bd3f401a76a7b83d6547
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Thu Jul 12 18:32:06 2012 +0200

    fedora: Remove redundant members
    
    FedoraInstaller::initrd_path and FedoraInstaller::kernel_path can
    be easily inferred from initrd_file and kernel_file so no need
    to keep those around.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=679752

 src/fedora-installer.vala |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/src/fedora-installer.vala b/src/fedora-installer.vala
index 641cb72..a6526af 100644
--- a/src/fedora-installer.vala
+++ b/src/fedora-installer.vala
@@ -13,9 +13,6 @@ private class Boxes.FedoraInstaller: UnattendedInstaller {
     private File kernel_file;
     private File initrd_file;
 
-    private string kernel_path;
-    private string initrd_path;
-
     private string kbd;
 
     private static Regex kbd_regex;
@@ -38,11 +35,11 @@ private class Boxes.FedoraInstaller: UnattendedInstaller {
     }
 
     public override void set_direct_boot_params (GVirConfig.DomainOs os) {
-        if (kernel_path == null || initrd_path == null)
+        if (kernel_file == null || initrd_file == null)
             return;
 
-        os.set_kernel (kernel_path);
-        os.set_ramdisk (initrd_path);
+        os.set_kernel (kernel_file.get_path ());
+        os.set_ramdisk (initrd_file.get_path ());
         os.set_cmdline ("ks=hd:sda:/ks.cfg");
     }
 
@@ -118,9 +115,9 @@ private class Boxes.FedoraInstaller: UnattendedInstaller {
     }
 
     private async void extract_boot_files (Cancellable? cancellable) throws GLib.Error {
-        kernel_path = Path.build_filename (mount_point, os_media.kernel_path);
+        string kernel_path = Path.build_filename (mount_point, os_media.kernel_path);
         kernel_file = File.new_for_path (kernel_path);
-        initrd_path = Path.build_filename (mount_point, os_media.initrd_path);
+        string initrd_path = Path.build_filename (mount_point, os_media.initrd_path);
         initrd_file = File.new_for_path (initrd_path);
 
         if (!mounted)



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