/[smeserver]/rpms/mkinitrd/sme7/mkinitrd-kernel-cmdline-spaces.patch
ViewVC logotype

Annotation of /rpms/mkinitrd/sme7/mkinitrd-kernel-cmdline-spaces.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Mon Aug 24 14:52:58 2009 UTC (15 years, 3 months ago) by slords
Branch: MAIN
CVS Tags: mkinitrd-4_2_1_13-4_1_el4_sme, mkinitrd-4_2_1_13-4_2_el4_sme, mkinitrd-4_2_1_13-4, HEAD
Import CentOS 4.8 sources

1 slords 1.1 --- mkinitrd-4.2.1.8/nash/nash.c.orig
2     +++ mkinitrd-4.2.1.8/nash/nash.c
3     @@ -836,11 +836,18 @@
4     }
5    
6     if (cmdline != NULL) {
7     + char quote = '\0';
8     char * chptr, * start;
9    
10     start = chptr = cmdline;
11     for (; (i < MAX_INIT_ARGS) && (*start != '\0'); i++) {
12     - while (*chptr && !isspace(*chptr)) chptr++;
13     + while (*chptr && (*chptr != quote)) {
14     + if (isspace(*chptr) && quote == '\0') break;
15     + if (*chptr == '"') quote = '"';
16     + if (*chptr == '\'') quote = '\'';
17     + chptr++;
18     + }
19     + if (quote == '"' || quote == '\'') chptr++;
20     if (*chptr != '\0') *(chptr++) = '\0';
21     initargs[i] = strdup(start);
22     start = chptr;

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed