|
@@ -66,7 +66,8 @@ static void cmdline_init ( void ) {
|
66
|
66
|
struct image *image = &cmdline_image;
|
67
|
67
|
userptr_t cmdline_user;
|
68
|
68
|
char *cmdline;
|
69
|
|
- char *tmp;
|
|
69
|
+ char *boot_image;
|
|
70
|
+ char *boot_image_end;
|
70
|
71
|
size_t len;
|
71
|
72
|
|
72
|
73
|
/* Do nothing if no command line was specified */
|
|
@@ -91,9 +92,18 @@ static void cmdline_init ( void ) {
|
91
|
92
|
/* Check for unwanted cruft in the command line */
|
92
|
93
|
while ( isspace ( *cmdline ) )
|
93
|
94
|
cmdline++;
|
94
|
|
- if ( ( tmp = strstr ( cmdline, "BOOT_IMAGE=" ) ) != NULL ) {
|
95
|
|
- DBGC ( image, "CMDLINE stripping \"%s\"\n", tmp );
|
96
|
|
- *tmp = '\0';
|
|
95
|
+ if ( ( boot_image = strstr ( cmdline, "BOOT_IMAGE=" ) ) != NULL ) {
|
|
96
|
+ boot_image_end = strchr ( boot_image, ' ' );
|
|
97
|
+ if ( boot_image_end ) {
|
|
98
|
+ *boot_image_end = '\0';
|
|
99
|
+ DBGC ( image, "CMDLINE stripping \"%s\"\n",
|
|
100
|
+ boot_image );
|
|
101
|
+ strcpy ( boot_image, ( boot_image_end + 1 ) );
|
|
102
|
+ } else {
|
|
103
|
+ DBGC ( image, "CMDLINE stripping \"%s\"\n",
|
|
104
|
+ boot_image );
|
|
105
|
+ *boot_image = '\0';
|
|
106
|
+ }
|
97
|
107
|
}
|
98
|
108
|
DBGC ( image, "CMDLINE using \"%s\"\n", cmdline );
|
99
|
109
|
|