[PATCH] Support the stage2= parameter, and add a flag for it.

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

 



---
 loader2/loader.c |    6 +++++-
 loader2/loader.h |    3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/loader2/loader.c b/loader2/loader.c
index 9839fec..bd65891 100644
--- a/loader2/loader.c
+++ b/loader2/loader.c
@@ -869,8 +869,12 @@ static void parseCmdLineFlags(struct loaderData_s * loaderData,
             loaderData->kbd = strdup(argv[i] + 7);
             loaderData->kbd_set = 1;
         }
-        else if (!strncasecmp(argv[i], "method=", 7))
+        else if (!strncasecmp(argv[i], "method=", 7) && !FL_STAGE2(flags))
             setMethodFromCmdline(argv[i] + 7, loaderData);
+        else if (!strncasecmp(argv[i], "stage2=", 7)) {
+            flags |= LOADER_FLAGS_STAGE2;
+            setMethodFromCmdline(argv[i] + 7, loaderData);
+        }
         else if (!strncasecmp(argv[i], "hostname=", 9))
             loaderData->hostname = strdup(argv[i] + 9);
         else if (!strncasecmp(argv[i], "ip=", 3))
diff --git a/loader2/loader.h b/loader2/loader.h
index 112d0e1..8bd9e5f 100644
--- a/loader2/loader.h
+++ b/loader2/loader.h
@@ -45,7 +45,7 @@
 #define LOADER_FLAGS_HALT               (((uint64_t) 1) << 13)
 #define LOADER_FLAGS_SELINUX            (((uint64_t) 1) << 14)
 #define LOADER_FLAGS_VIRTPCONSOLE       (((uint64_t) 1) << 15)
-/* #16 unused */
+#define LOADER_FLAGS_STAGE2             (((uint64_t) 1) << 16)
 #define LOADER_FLAGS_NOSHELL            (((uint64_t) 1) << 17)
 #define LOADER_FLAGS_NOPCMCIA           (((uint64_t) 1) << 18)
 #define LOADER_FLAGS_TELNETD            (((uint64_t) 1) << 19)
@@ -79,6 +79,7 @@
 #define FL_SERIAL(a)             ((a) & LOADER_FLAGS_SERIAL)
 #define FL_UPDATES(a)            ((a) & LOADER_FLAGS_UPDATES)
 #define FL_KSFILE(a)             ((a) & LOADER_FLAGS_KSFILE)
+#define FL_STAGE2(a)             ((a) & LOADER_FLAGS_STAGE2)
 #define FL_NOSHELL(a)            ((a) & LOADER_FLAGS_NOSHELL)
 #define FL_TELNETD(a)            ((a) & LOADER_FLAGS_TELNETD)
 #define FL_NOPASS(a)             ((a) & LOADER_FLAGS_NOPASS)
-- 
1.5.3.7

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux