public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6 early userspace init
@ 2003-11-12 11:50 Michael Schroeder
  2003-11-12 16:45 ` Bryan O'Sullivan
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Schroeder @ 2003-11-12 11:50 UTC (permalink / raw)
  To: linux-kernel


Hi folks,

how about adding something like this to init/do_mounts.c?

--- do_mounts.c.orig	2003-11-12 12:49:12.000000000 +0100
+++ do_mounts.c	2003-11-12 12:02:05.000000000 +0100
@@ -14,6 +14,7 @@
 #include "do_mounts.h"
 
 extern int get_filesystem_list(char * buf);
+extern asmlinkage long sys_access(const char * filename, int mode);
 
 int __initdata rd_doload;	/* 1 = load RAM disk, 0 = don't load */
 
@@ -393,6 +394,13 @@
 	if (initrd_load())
 		goto out;
 
+	/*
+	 * check if there is an early userspace init, if yes
+	 * let it do all the work
+	 */
+	if (sys_access("/sbin/init", 0) == 0)
+		goto out;
+
 	if (is_floppy && rd_doload && rd_load_disk(0))
 		ROOT_DEV = Root_RAM0;
 
I wont to be able to fetch the boot= parameter via /proc/cmdline
in kinit and choose the boot devices, so I dislike the boot=0:0
suggestion.

Also, should the above code clear the init= parameter, i.e.
main.c:execute_command?

Cheers,
  Michael.

-- 
Michael Schroeder                                   mls@suse.de
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-11-14 16:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-12 11:50 2.6 early userspace init Michael Schroeder
2003-11-12 16:45 ` Bryan O'Sullivan
2003-11-12 16:53   ` Michael Schroeder
2003-11-13 21:32   ` H. Peter Anvin
2003-11-14 16:39     ` Michael Schroeder

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