All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Schroeder <mls@suse.de>
To: linux-kernel@vger.kernel.org
Subject: 2.6 early userspace init
Date: Wed, 12 Nov 2003 12:50:21 +0100	[thread overview]
Message-ID: <20031112115021.GA24875@suse.de> (raw)


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);}

             reply	other threads:[~2003-11-12 11:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-12 11:50 Michael Schroeder [this message]
2003-11-12 16:45 ` 2.6 early userspace init 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031112115021.GA24875@suse.de \
    --to=mls@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.