FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 03-08-2011, 05:55 AM
"Brian C. Lane"
 
Default Add global vars to retain parsed /proc/cmdline (#569883)

/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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 04:54 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org