diff options
Diffstat (limited to 'init/main.c')
-rw-r--r-- | init/main.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/init/main.c b/init/main.c index 2a89545e0a5d..c599aea23bb1 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -235,7 +235,8 @@ static int __init loglevel(char *str) | |||
235 | early_param("loglevel", loglevel); | 235 | early_param("loglevel", loglevel); |
236 | 236 | ||
237 | /* Change NUL term back to "=", to make "param" the whole string. */ | 237 | /* Change NUL term back to "=", to make "param" the whole string. */ |
238 | static int __init repair_env_string(char *param, char *val, const char *unused) | 238 | static int __init repair_env_string(char *param, char *val, |
239 | const char *unused, void *arg) | ||
239 | { | 240 | { |
240 | if (val) { | 241 | if (val) { |
241 | /* param=val or param="val"? */ | 242 | /* param=val or param="val"? */ |
@@ -252,14 +253,15 @@ static int __init repair_env_string(char *param, char *val, const char *unused) | |||
252 | } | 253 | } |
253 | 254 | ||
254 | /* Anything after -- gets handed straight to init. */ | 255 | /* Anything after -- gets handed straight to init. */ |
255 | static int __init set_init_arg(char *param, char *val, const char *unused) | 256 | static int __init set_init_arg(char *param, char *val, |
257 | const char *unused, void *arg) | ||
256 | { | 258 | { |
257 | unsigned int i; | 259 | unsigned int i; |
258 | 260 | ||
259 | if (panic_later) | 261 | if (panic_later) |
260 | return 0; | 262 | return 0; |
261 | 263 | ||
262 | repair_env_string(param, val, unused); | 264 | repair_env_string(param, val, unused, NULL); |
263 | 265 | ||
264 | for (i = 0; argv_init[i]; i++) { | 266 | for (i = 0; argv_init[i]; i++) { |
265 | if (i == MAX_INIT_ARGS) { | 267 | if (i == MAX_INIT_ARGS) { |
@@ -276,9 +278,10 @@ static int __init set_init_arg(char *param, char *val, const char *unused) | |||
276 | * Unknown boot options get handed to init, unless they look like | 278 | * Unknown boot options get handed to init, unless they look like |
277 | * unused parameters (modprobe will find them in /proc/cmdline). | 279 | * unused parameters (modprobe will find them in /proc/cmdline). |
278 | */ | 280 | */ |
279 | static int __init unknown_bootoption(char *param, char *val, const char *unused) | 281 | static int __init unknown_bootoption(char *param, char *val, |
282 | const char *unused, void *arg) | ||
280 | { | 283 | { |
281 | repair_env_string(param, val, unused); | 284 | repair_env_string(param, val, unused, NULL); |
282 | 285 | ||
283 | /* Handle obsolete-style parameters */ | 286 | /* Handle obsolete-style parameters */ |
284 | if (obsolete_checksetup(param)) | 287 | if (obsolete_checksetup(param)) |
@@ -410,7 +413,8 @@ static noinline void __init_refok rest_init(void) | |||
410 | } | 413 | } |
411 | 414 | ||
412 | /* Check for early params. */ | 415 | /* Check for early params. */ |
413 | static int __init do_early_param(char *param, char *val, const char *unused) | 416 | static int __init do_early_param(char *param, char *val, |
417 | const char *unused, void *arg) | ||
414 | { | 418 | { |
415 | const struct obs_kernel_param *p; | 419 | const struct obs_kernel_param *p; |
416 | 420 | ||
@@ -429,7 +433,8 @@ static int __init do_early_param(char *param, char *val, const char *unused) | |||
429 | 433 | ||
430 | void __init parse_early_options(char *cmdline) | 434 | void __init parse_early_options(char *cmdline) |
431 | { | 435 | { |
432 | parse_args("early options", cmdline, NULL, 0, 0, 0, do_early_param); | 436 | parse_args("early options", cmdline, NULL, 0, 0, 0, NULL, |
437 | do_early_param); | ||
433 | } | 438 | } |
434 | 439 | ||
435 | /* Arch code calls this early on, or if not, just before other parsing. */ | 440 | /* Arch code calls this early on, or if not, just before other parsing. */ |
@@ -535,10 +540,10 @@ asmlinkage __visible void __init start_kernel(void) | |||
535 | after_dashes = parse_args("Booting kernel", | 540 | after_dashes = parse_args("Booting kernel", |
536 | static_command_line, __start___param, | 541 | static_command_line, __start___param, |
537 | __stop___param - __start___param, | 542 | __stop___param - __start___param, |
538 | -1, -1, &unknown_bootoption); | 543 | -1, -1, NULL, &unknown_bootoption); |
539 | if (!IS_ERR_OR_NULL(after_dashes)) | 544 | if (!IS_ERR_OR_NULL(after_dashes)) |
540 | parse_args("Setting init args", after_dashes, NULL, 0, -1, -1, | 545 | parse_args("Setting init args", after_dashes, NULL, 0, -1, -1, |
541 | set_init_arg); | 546 | NULL, set_init_arg); |
542 | 547 | ||
543 | jump_label_init(); | 548 | jump_label_init(); |
544 | 549 | ||
@@ -848,7 +853,7 @@ static void __init do_initcall_level(int level) | |||
848 | initcall_command_line, __start___param, | 853 | initcall_command_line, __start___param, |
849 | __stop___param - __start___param, | 854 | __stop___param - __start___param, |
850 | level, level, | 855 | level, level, |
851 | &repair_env_string); | 856 | NULL, &repair_env_string); |
852 | 857 | ||
853 | for (fn = initcall_levels[level]; fn < initcall_levels[level+1]; fn++) | 858 | for (fn = initcall_levels[level]; fn < initcall_levels[level+1]; fn++) |
854 | do_one_initcall(*fn); | 859 | do_one_initcall(*fn); |