Patch: don't report rd found when none is there

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The current code in a/m/k/setup.c assigns __rd_start & __rd_end to
initrd_start and initrd_end even when no ramdisk was added to the kernel
image. This gives an "Initial ramdisk at:...." message even though no
ramdisk is there. Attached patch fixes this. It furthermore prevents
initrd_{start,end} being overriden(in case it gets set somewhere in the
board specific code).
 -- Guido
--- arch/mips/kernel/setup.c.orig	Thu Aug 23 09:36:31 2001
+++ arch/mips/kernel/setup.c	Thu Aug 23 09:36:40 2001
@@ -725,8 +719,10 @@
 #ifdef CONFIG_BLK_DEV_INITRD
 	/* Board specific code should have set up initrd_start and initrd_end */
 	ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0);
-	initrd_start = (unsigned long)&__rd_start;
-	initrd_end = (unsigned long)&__rd_end;
+	if( __rd_start != __rd_end ) {
+		initrd_start = (unsigned long)&__rd_start;
+		initrd_end = (unsigned long)&__rd_end;
+	}
 	initrd_below_start_ok = 1;
 	if (initrd_start) {
 		unsigned long initrd_size = ((unsigned char *)initrd_end) - ((unsigned char *)initrd_start); 

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux