diff options
author | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2006-03-31 05:30:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-31 15:18:53 -0500 |
commit | 9b41046cd0ee0a57f849d6e1363f7933e363cca9 (patch) | |
tree | 246820e9493770e071cb92a48e7f72d8b9c90a98 /drivers | |
parent | 68eef3b4791572ecb70249c7fb145bb3742dd899 (diff) |
[PATCH] Don't pass boot parameters to argv_init[]
The boot cmdline is parsed in parse_early_param() and
parse_args(,unknown_bootoption).
And __setup() is used in obsolete_checksetup().
start_kernel()
-> parse_args()
-> unknown_bootoption()
-> obsolete_checksetup()
If __setup()'s callback (->setup_func()) returns 1 in
obsolete_checksetup(), obsolete_checksetup() thinks a parameter was
handled.
If ->setup_func() returns 0, obsolete_checksetup() tries other
->setup_func(). If all ->setup_func() that matched a parameter returns 0,
a parameter is seted to argv_init[].
Then, when runing /sbin/init or init=app, argv_init[] is passed to the app.
If the app doesn't ignore those arguments, it will warning and exit.
This patch fixes a wrong usage of it, however fixes obvious one only.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/ec.c | 4 | ||||
-rw-r--r-- | drivers/block/amiflop.c | 1 | ||||
-rw-r--r-- | drivers/media/video/cpia_pp.c | 2 | ||||
-rw-r--r-- | drivers/net/netconsole.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/xirc2ps_cs.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/vrc4171_card.c | 12 | ||||
-rw-r--r-- | drivers/pcmcia/vrc4173_cardu.c | 8 | ||||
-rw-r--r-- | drivers/scsi/ibmmca.c | 2 | ||||
-rw-r--r-- | drivers/video/console/fbcon.c | 10 | ||||
-rw-r--r-- | drivers/video/console/sticore.c | 4 | ||||
-rw-r--r-- | drivers/video/fbmem.c | 2 | ||||
-rw-r--r-- | drivers/video/stifb.c | 4 |
12 files changed, 27 insertions, 26 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 79b09d76c180..eee0864ba300 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -1572,7 +1572,7 @@ static void __exit acpi_ec_exit(void) | |||
1572 | static int __init acpi_fake_ecdt_setup(char *str) | 1572 | static int __init acpi_fake_ecdt_setup(char *str) |
1573 | { | 1573 | { |
1574 | acpi_fake_ecdt_enabled = 1; | 1574 | acpi_fake_ecdt_enabled = 1; |
1575 | return 0; | 1575 | return 1; |
1576 | } | 1576 | } |
1577 | 1577 | ||
1578 | __setup("acpi_fake_ecdt", acpi_fake_ecdt_setup); | 1578 | __setup("acpi_fake_ecdt", acpi_fake_ecdt_setup); |
@@ -1591,7 +1591,7 @@ static int __init acpi_ec_set_intr_mode(char *str) | |||
1591 | acpi_ec_driver.ops.add = acpi_ec_poll_add; | 1591 | acpi_ec_driver.ops.add = acpi_ec_poll_add; |
1592 | } | 1592 | } |
1593 | printk(KERN_INFO PREFIX "EC %s mode.\n", intr ? "interrupt" : "polling"); | 1593 | printk(KERN_INFO PREFIX "EC %s mode.\n", intr ? "interrupt" : "polling"); |
1594 | return 0; | 1594 | return 1; |
1595 | } | 1595 | } |
1596 | 1596 | ||
1597 | __setup("ec_intr=", acpi_ec_set_intr_mode); | 1597 | __setup("ec_intr=", acpi_ec_set_intr_mode); |
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c index b6e290956214..2a8af685926f 100644 --- a/drivers/block/amiflop.c +++ b/drivers/block/amiflop.c | |||
@@ -1850,6 +1850,7 @@ static int __init amiga_floppy_setup (char *str) | |||
1850 | return 0; | 1850 | return 0; |
1851 | printk (KERN_INFO "amiflop: Setting default df0 to %x\n", n); | 1851 | printk (KERN_INFO "amiflop: Setting default df0 to %x\n", n); |
1852 | fd_def_df0 = n; | 1852 | fd_def_df0 = n; |
1853 | return 1; | ||
1853 | } | 1854 | } |
1854 | 1855 | ||
1855 | __setup("floppy=", amiga_floppy_setup); | 1856 | __setup("floppy=", amiga_floppy_setup); |
diff --git a/drivers/media/video/cpia_pp.c b/drivers/media/video/cpia_pp.c index 3021f21aae36..0b00e6027dfb 100644 --- a/drivers/media/video/cpia_pp.c +++ b/drivers/media/video/cpia_pp.c | |||
@@ -873,7 +873,7 @@ static int __init cpia_pp_setup(char *str) | |||
873 | parport_nr[parport_ptr++] = PPCPIA_PARPORT_NONE; | 873 | parport_nr[parport_ptr++] = PPCPIA_PARPORT_NONE; |
874 | } | 874 | } |
875 | 875 | ||
876 | return 0; | 876 | return 1; |
877 | } | 877 | } |
878 | 878 | ||
879 | __setup("cpia_pp=", cpia_pp_setup); | 879 | __setup("cpia_pp=", cpia_pp_setup); |
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index edd1b5306b16..75b35ad760de 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c | |||
@@ -94,7 +94,7 @@ static struct console netconsole = { | |||
94 | static int option_setup(char *opt) | 94 | static int option_setup(char *opt) |
95 | { | 95 | { |
96 | configured = !netpoll_parse_options(&np, opt); | 96 | configured = !netpoll_parse_options(&np, opt); |
97 | return 0; | 97 | return 1; |
98 | } | 98 | } |
99 | 99 | ||
100 | __setup("netconsole=", option_setup); | 100 | __setup("netconsole=", option_setup); |
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index eed496803fe4..e8f849e12976 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
@@ -1973,7 +1973,7 @@ static int __init setup_xirc2ps_cs(char *str) | |||
1973 | MAYBE_SET(lockup_hack, 6); | 1973 | MAYBE_SET(lockup_hack, 6); |
1974 | #undef MAYBE_SET | 1974 | #undef MAYBE_SET |
1975 | 1975 | ||
1976 | return 0; | 1976 | return 1; |
1977 | } | 1977 | } |
1978 | 1978 | ||
1979 | __setup("xirc2ps_cs=", setup_xirc2ps_cs); | 1979 | __setup("xirc2ps_cs=", setup_xirc2ps_cs); |
diff --git a/drivers/pcmcia/vrc4171_card.c b/drivers/pcmcia/vrc4171_card.c index 0574efd7828a..459e6e1946fd 100644 --- a/drivers/pcmcia/vrc4171_card.c +++ b/drivers/pcmcia/vrc4171_card.c | |||
@@ -634,7 +634,7 @@ static void vrc4171_remove_sockets(void) | |||
634 | static int __devinit vrc4171_card_setup(char *options) | 634 | static int __devinit vrc4171_card_setup(char *options) |
635 | { | 635 | { |
636 | if (options == NULL || *options == '\0') | 636 | if (options == NULL || *options == '\0') |
637 | return 0; | 637 | return 1; |
638 | 638 | ||
639 | if (strncmp(options, "irq:", 4) == 0) { | 639 | if (strncmp(options, "irq:", 4) == 0) { |
640 | int irq; | 640 | int irq; |
@@ -644,7 +644,7 @@ static int __devinit vrc4171_card_setup(char *options) | |||
644 | vrc4171_irq = irq; | 644 | vrc4171_irq = irq; |
645 | 645 | ||
646 | if (*options != ',') | 646 | if (*options != ',') |
647 | return 0; | 647 | return 1; |
648 | options++; | 648 | options++; |
649 | } | 649 | } |
650 | 650 | ||
@@ -663,10 +663,10 @@ static int __devinit vrc4171_card_setup(char *options) | |||
663 | } | 663 | } |
664 | 664 | ||
665 | if (*options != ',') | 665 | if (*options != ',') |
666 | return 0; | 666 | return 1; |
667 | options++; | 667 | options++; |
668 | } else | 668 | } else |
669 | return 0; | 669 | return 1; |
670 | 670 | ||
671 | } | 671 | } |
672 | 672 | ||
@@ -688,7 +688,7 @@ static int __devinit vrc4171_card_setup(char *options) | |||
688 | } | 688 | } |
689 | 689 | ||
690 | if (*options != ',') | 690 | if (*options != ',') |
691 | return 0; | 691 | return 1; |
692 | options++; | 692 | options++; |
693 | 693 | ||
694 | if (strncmp(options, "memnoprobe", 10) == 0) | 694 | if (strncmp(options, "memnoprobe", 10) == 0) |
@@ -700,7 +700,7 @@ static int __devinit vrc4171_card_setup(char *options) | |||
700 | } | 700 | } |
701 | } | 701 | } |
702 | 702 | ||
703 | return 0; | 703 | return 1; |
704 | } | 704 | } |
705 | 705 | ||
706 | __setup("vrc4171_card=", vrc4171_card_setup); | 706 | __setup("vrc4171_card=", vrc4171_card_setup); |
diff --git a/drivers/pcmcia/vrc4173_cardu.c b/drivers/pcmcia/vrc4173_cardu.c index 57f38dba0a48..6004196f7cc1 100644 --- a/drivers/pcmcia/vrc4173_cardu.c +++ b/drivers/pcmcia/vrc4173_cardu.c | |||
@@ -516,7 +516,7 @@ static int __devinit vrc4173_cardu_probe(struct pci_dev *dev, | |||
516 | static int __devinit vrc4173_cardu_setup(char *options) | 516 | static int __devinit vrc4173_cardu_setup(char *options) |
517 | { | 517 | { |
518 | if (options == NULL || *options == '\0') | 518 | if (options == NULL || *options == '\0') |
519 | return 0; | 519 | return 1; |
520 | 520 | ||
521 | if (strncmp(options, "cardu1:", 7) == 0) { | 521 | if (strncmp(options, "cardu1:", 7) == 0) { |
522 | options += 7; | 522 | options += 7; |
@@ -527,9 +527,9 @@ static int __devinit vrc4173_cardu_setup(char *options) | |||
527 | } | 527 | } |
528 | 528 | ||
529 | if (*options != ',') | 529 | if (*options != ',') |
530 | return 0; | 530 | return 1; |
531 | } else | 531 | } else |
532 | return 0; | 532 | return 1; |
533 | } | 533 | } |
534 | 534 | ||
535 | if (strncmp(options, "cardu2:", 7) == 0) { | 535 | if (strncmp(options, "cardu2:", 7) == 0) { |
@@ -538,7 +538,7 @@ static int __devinit vrc4173_cardu_setup(char *options) | |||
538 | cardu_sockets[CARDU2].noprobe = 1; | 538 | cardu_sockets[CARDU2].noprobe = 1; |
539 | } | 539 | } |
540 | 540 | ||
541 | return 0; | 541 | return 1; |
542 | } | 542 | } |
543 | 543 | ||
544 | __setup("vrc4173_cardu=", vrc4173_cardu_setup); | 544 | __setup("vrc4173_cardu=", vrc4173_cardu_setup); |
diff --git a/drivers/scsi/ibmmca.c b/drivers/scsi/ibmmca.c index 3a8462e8d063..24eb59e143a9 100644 --- a/drivers/scsi/ibmmca.c +++ b/drivers/scsi/ibmmca.c | |||
@@ -2488,7 +2488,7 @@ static int option_setup(char *str) | |||
2488 | } | 2488 | } |
2489 | ints[0] = i - 1; | 2489 | ints[0] = i - 1; |
2490 | internal_ibmmca_scsi_setup(cur, ints); | 2490 | internal_ibmmca_scsi_setup(cur, ints); |
2491 | return 0; | 2491 | return 1; |
2492 | } | 2492 | } |
2493 | 2493 | ||
2494 | __setup("ibmmcascsi=", option_setup); | 2494 | __setup("ibmmcascsi=", option_setup); |
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 041d06987861..d7351560f581 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -466,7 +466,7 @@ static int __init fb_console_setup(char *this_opt) | |||
466 | int i, j; | 466 | int i, j; |
467 | 467 | ||
468 | if (!this_opt || !*this_opt) | 468 | if (!this_opt || !*this_opt) |
469 | return 0; | 469 | return 1; |
470 | 470 | ||
471 | while ((options = strsep(&this_opt, ",")) != NULL) { | 471 | while ((options = strsep(&this_opt, ",")) != NULL) { |
472 | if (!strncmp(options, "font:", 5)) | 472 | if (!strncmp(options, "font:", 5)) |
@@ -481,10 +481,10 @@ static int __init fb_console_setup(char *this_opt) | |||
481 | options++; | 481 | options++; |
482 | } | 482 | } |
483 | if (*options != ',') | 483 | if (*options != ',') |
484 | return 0; | 484 | return 1; |
485 | options++; | 485 | options++; |
486 | } else | 486 | } else |
487 | return 0; | 487 | return 1; |
488 | } | 488 | } |
489 | 489 | ||
490 | if (!strncmp(options, "map:", 4)) { | 490 | if (!strncmp(options, "map:", 4)) { |
@@ -496,7 +496,7 @@ static int __init fb_console_setup(char *this_opt) | |||
496 | con2fb_map_boot[i] = | 496 | con2fb_map_boot[i] = |
497 | (options[j++]-'0') % FB_MAX; | 497 | (options[j++]-'0') % FB_MAX; |
498 | } | 498 | } |
499 | return 0; | 499 | return 1; |
500 | } | 500 | } |
501 | 501 | ||
502 | if (!strncmp(options, "vc:", 3)) { | 502 | if (!strncmp(options, "vc:", 3)) { |
@@ -518,7 +518,7 @@ static int __init fb_console_setup(char *this_opt) | |||
518 | rotate = 0; | 518 | rotate = 0; |
519 | } | 519 | } |
520 | } | 520 | } |
521 | return 0; | 521 | return 1; |
522 | } | 522 | } |
523 | 523 | ||
524 | __setup("fbcon=", fb_console_setup); | 524 | __setup("fbcon=", fb_console_setup); |
diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index d6041e781aca..74ac2acaf72c 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c | |||
@@ -275,7 +275,7 @@ static int __init sti_setup(char *str) | |||
275 | if (str) | 275 | if (str) |
276 | strlcpy (default_sti_path, str, sizeof (default_sti_path)); | 276 | strlcpy (default_sti_path, str, sizeof (default_sti_path)); |
277 | 277 | ||
278 | return 0; | 278 | return 1; |
279 | } | 279 | } |
280 | 280 | ||
281 | /* Assuming the machine has multiple STI consoles (=graphic cards) which | 281 | /* Assuming the machine has multiple STI consoles (=graphic cards) which |
@@ -321,7 +321,7 @@ static int __init sti_font_setup(char *str) | |||
321 | i++; | 321 | i++; |
322 | } | 322 | } |
323 | 323 | ||
324 | return 0; | 324 | return 1; |
325 | } | 325 | } |
326 | 326 | ||
327 | /* The optional linux kernel parameter "sti_font" defines which font | 327 | /* The optional linux kernel parameter "sti_font" defines which font |
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index b1a8dca76430..944855b3e4af 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -1588,7 +1588,7 @@ static int __init video_setup(char *options) | |||
1588 | } | 1588 | } |
1589 | } | 1589 | } |
1590 | 1590 | ||
1591 | return 0; | 1591 | return 1; |
1592 | } | 1592 | } |
1593 | __setup("video=", video_setup); | 1593 | __setup("video=", video_setup); |
1594 | #endif | 1594 | #endif |
diff --git a/drivers/video/stifb.c b/drivers/video/stifb.c index 8d5f35676f9a..4a292aae6eb2 100644 --- a/drivers/video/stifb.c +++ b/drivers/video/stifb.c | |||
@@ -1378,7 +1378,7 @@ stifb_setup(char *options) | |||
1378 | int i; | 1378 | int i; |
1379 | 1379 | ||
1380 | if (!options || !*options) | 1380 | if (!options || !*options) |
1381 | return 0; | 1381 | return 1; |
1382 | 1382 | ||
1383 | if (strncmp(options, "off", 3) == 0) { | 1383 | if (strncmp(options, "off", 3) == 0) { |
1384 | stifb_disabled = 1; | 1384 | stifb_disabled = 1; |
@@ -1393,7 +1393,7 @@ stifb_setup(char *options) | |||
1393 | stifb_bpp_pref[i] = simple_strtoul(options, &options, 10); | 1393 | stifb_bpp_pref[i] = simple_strtoul(options, &options, 10); |
1394 | } | 1394 | } |
1395 | } | 1395 | } |
1396 | return 0; | 1396 | return 1; |
1397 | } | 1397 | } |
1398 | 1398 | ||
1399 | __setup("stifb=", stifb_setup); | 1399 | __setup("stifb=", stifb_setup); |