mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [2.5.51+] kernel not honoring init= bootparm? (fwd)
       [not found] <Pine.LNX.4.43.0212201540160.3821-100000@morpheus>
@ 2002-12-23  2:08 ` Rusty Russell
  0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2002-12-23  2:08 UTC (permalink / raw)
  To: Burton Windle; +Cc: torvalds, linux-kernel

In message <Pine.LNX.4.43.0212201540160.3821-100000@morpheus> you write:
> I think this might be due to the changes you made.

Indeed it was.  Looks like overzealous patch cropping on my part.

This works for me.  Linus, please apply.

Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

Name: init= boot command line fix
Author: Rusty Russell
Status: Tested on 2.5.52

D: Restores the accidentally dropped code to handle init=.

diff -urNp --exclude TAGS -X /home/rusty/current-dontdiff --minimal linux-2.5.52/init/main.c working-2.5.52-noexit/init/main.c
--- linux-2.5.52/init/main.c	Tue Dec 17 08:11:00 2002
+++ working-2.5.52-noexit/init/main.c	Mon Dec 23 12:49:41 2002
@@ -259,6 +259,22 @@ static int __init unknown_bootoption(cha
 	return 0;
 }
 
+static int __init init_setup(char *str)
+{
+	unsigned int i;
+
+	execute_command = str;
+	/* In case LILO is going to boot us with default command line,
+	 * it prepends "auto" before the whole cmdline which makes
+	 * the shell think it should execute a script with such name.
+	 * So we ignore all arguments entered _before_ init=... [MJ]
+	 */
+	for (i = 1; i < MAX_INIT_ARGS; i++)
+		argv_init[i] = NULL;
+	return 1;
+}
+__setup("init=", init_setup);
+
 extern void setup_arch(char **);
 extern void cpu_idle(void);
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-23  2:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.43.0212201540160.3821-100000@morpheus>
2002-12-23  2:08 ` [2.5.51+] kernel not honoring init= bootparm? (fwd) Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®