lkml.org 
[lkml]   [1998]   [Jan]   [16]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
Subject[patch] /linuxrc - Why is this excluded if root=/dev/ram0?
FromDave Cinege <>
DateFri, 16 Jan 1998 07:25:14 -0500
Is there any reason that -

		pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
		if (pid>0)
			while (pid != wait(&i));
Should not be just before this, instead of enclosed in it?

linux/init/main.c	line 1140 2.1.78, 982 2.0.33

#ifdef CONFIG_BLK_DEV_INITRD
	root_mountflags = real_root_mountflags;
	if (mount_initrd && ROOT_DEV != real_root_dev && ROOT_DEV == MKDEV(RAMDISK_MAJOR,0)) {
		int error;
		pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
		if (pid>0)
			while (pid != wait(&i));

As far as I'm concerned if /linuxrc is present it should just be run, even if initrd is not
present, or if the root=/dev/ram0. This fixes it, if there is no reason it should not
be this way:

linux-2.0.33/init/main.c line 918
linux-2.1.78/init/main.c line 1069

-#ifdef CONFIG_BLK_DEV_INITRD
 static int do_linuxrc(void * shell)
 {

linux-2.0.33/init/main.c line 930
linux-2.1.78/init/main.c line 1081

+#ifdef CONFIG_BLK_DEV_INITRD
 static void no_initrd(char *s,int *ints)
{
	mount_initrd = 0;

linux-2.0.33/init/main.c line 985

		int error;

-		pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
-		if (pid>0)
-			while (pid != wait(&i));
		if (real_root_dev != MKDEV(RAMDISK_MAJOR, 0)) {
			error = change_root(real_root_dev,"/initrd");
linux-2.1.78/init/main.c line 1142

	if (mount_initrd && ROOT_DEV != real_root_dev && ROOT_DEV == MKDEV(RAMDISK_MAJOR,0)) {
		int error;
-		int i, pid;
-		pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
-		if (pid>0)
-			while (pid != wait(&i));
		if (real_root_dev != MKDEV(RAMDISK_MAJOR, 0)) {
			error = change_root(real_root_dev,"/initrd");

linux-2.0.33/init/main.c line 980
linux-2.1.78/init/main.c line 1138

	#endif

+	pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
+		if (pid>0)
+			while (pid != wait(&i));
#ifdef CONFIG_BLK_DEV_INITRD


linux-2.1.78/init/main.c line 1090

+	int i, pid;
 #ifdef CONFIG_BLK_DEV_INITRD
	int real_root_mountflags;
 #endif



\
 
 \ /
  Last update: 2005-03-22 12:41    [from the cache]
©2003-2008