BUGFIX: 1.3.96(modules) - drivers/block/rd.c:278: `rd_size' undeclared

Andrew C. Esh (andrewes@cnt.com)
Mon, 29 Apr 1996 14:00:53 -0500


BUG:
make modules
...
gcc -D__KERNEL__ -I/usr2/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
-fno-strength-reduce -pipe -m486 -DCPU=486 -DMODULE -DMODVERSIONS -include
/usr2/src/linux/include/linux/modversions.h -c -o loop.o loop.c
rd.c: In function `rd_init':
rd.c:278: `rd_size' undeclared (first use this function)
rd.c:278: (Each undeclared identifier is reported only once
rd.c:278: for each function it appears in.)

FIX:

diff -u drivers/block/rd.c drivers/block/rd.c.new
--- drivers/block/rd.c Mon Apr 29 13:52:57 1996
+++ drivers/block/rd.c.new Mon Apr 29 13:52:40 1996
@@ -90,11 +90,11 @@
* architecture-specific setup routine (from the stored bootsector
* information).
*/
+int rd_size = 4096; /* Size of the ramdisks */
#ifndef MODULE
int rd_doload = 0; /* 1 = load ramdisk, 0 = don't load */
int rd_prompt = 1; /* 1 = prompt for ramdisk, 0 = don't prompt */
int rd_image_start = 0; /* starting block # of image */
-int rd_size = 4096; /* Size of the ramdisks */
#ifdef CONFIG_BLK_DEV_INITRD
unsigned long initrd_start,initrd_end;
int mount_initrd = 1; /* zero if initrd should not be mounted */

This fixes it so it compiles, but due to other errors, I haven't
finished the kernel so I can test it.

You know what might catch stuff like this? Someone should do a full
compile, once with everything set to "Y", and once with everything
(which can be) set to "M". Save the output, and solve all the errors
and warnings. That way we stand a good chance of at least getting
clean compiles. I suppose it matters what compiler version and tools
you happen to be using; it can affect these results. My suggestion
is that we should have a set of "expected tools" (like what's listed
in the top of Documentation/CHANGES), and we solve compile problems
for just that set of tools. That also serves as a test of your tools: If
you get errors, something besides the source code for the compiler
needs to be upgraded.

--
Andrew C. Esh                   mailto: andrewes@cnt.com
Computer Network Technology	andrewes@mtn.org (finger for PGP key)
6500 Wedgwood Road		612.550.8000 (main)
Maple Grove MN 55311		612.550.8229 (direct)
http://www.cnt.com - CNT Inc. Home Page
http://www.mtn.org/~andrewes - ACE Home Page