[PATCH 1/5] Add global vars to retain parsed /proc/cmdline (#569883)

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

 



/proc/cmdline is going to need to be examined multiple times,
poptParseArgvString allocates an array for us, so retain it for
later use.

Related: rhbz#569883
---
 loader2/loader.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/loader2/loader.c b/loader2/loader.c
index 91dbbe1..db22da3 100644
--- a/loader2/loader.c
+++ b/loader2/loader.c
@@ -99,6 +99,8 @@
 /* maximum number of extra arguments that can be passed to the second stage */
 #define MAX_EXTRA_ARGS 128
 static char * extraArgs[MAX_EXTRA_ARGS];
+char **cmdline_argv = NULL;
+int cmdline_argc = 0;
 static int hasGraphicalOverride();
 
 static int newtRunning = 0;
@@ -635,6 +637,10 @@ static void parseCmdLineFlags(struct loaderData_s * loaderData,
     if (poptParseArgvString(cmdLine, &argc, (const char ***) &argv))
         return;
 
+    /* Save for later use by other functions */
+    cmdline_argv = argv;
+    cmdline_argc = argc;
+
     /* we want to default to graphical and allow override with 'text' */
     flags |= LOADER_FLAGS_GRAPHICAL;
 
-- 
1.7.4

_______________________________________________
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