Re: 2.1.126: drivers/scsi/sd.c not compiling

G. Allen Morris III (gam3@dharma.sehda.com)
Sun, 25 Oct 1998 10:37:14 -0800


This will get sb to compile, but I get undefined symbol errors when I
install it.

--- ./drivers/scsi/sd.c.orig Sat Oct 24 00:16:04 1998
+++ ./drivers/scsi/sd.c Sat Oct 24 00:52:04 1998
@@ -1783,13 +1783,13 @@

for (sdgd = gendisk_head; sdgd; sdgd = sdgd->next)
{
- if (sdgd->next >= sd_gendisks && sdgd->next <= LAST_SD_GENDISK)
+ if (sdgd->next >= sd_gendisks && sdgd->next <= &LAST_SD_GENDISK)
removed++, sdgd->next = sdgd->next->next;
else sdgd = sdgd->next;
}
- if (removed != N_USED_SCSI_DISKS)
+ if (removed != N_USED_SD_MAJORS)
printk("%s %d sd_gendisks in disk chain",
- removed > N_USED_SCSI_DISKS ? "total" : "just", removed);
+ removed > N_USED_SD_MAJORS ? "total" : "just", removed);

}

>>>Lutz Pressler said:
> Hi,
>
> sd.c not compiling, at least not as module:
>
> gcc -D__KERNEL__ -I/local/usr/src/linux/include -Wall -Wstrict-prototypes -O
2 -fomit-frame-pointer -pipe -fno-strength-reduce -m486 -malign-loops=2 -m
align-jumps=2 -malign-functions=2 -DCPU=686 -DMODULE -DMODVERSIONS -includ
e /local/usr/src/linux/include/linux/modversions.h -c -o sd.o sd.c
> sd.c: In function `cleanup_module':
> sd.c:1786: invalid operands to binary <=
> sd.c:1790: `N_USED_SCSI_DISKS' undeclared (first use this function)
> sd.c:1790: (Each undeclared identifier is reported only once
> sd.c:1790: for each function it appears in.)
> sd.c:1760: warning: unused variable `prev_sdgd'
> make[2]: *** [sd.o] Error 1
> make[2]: Leaving directory `/local/usr/src/linux/drivers/scsi'
> make[1]: *** [_modsubdir_scsi] Error 2
> make[1]: Leaving directory `/local/usr/src/linux/drivers'
> make: *** [_mod_drivers] Error 2
>
>
> Regards, Lutz
>
> --
> _ | Lutz Pressler | Tel: ++49-551-3700002
> |_ |\ | | Service Network GmbH | FAX: ++49-551-3700009
> ._|ER | \|ET | Hannah-Vogt-Strasse 1 | mailto:lp@SerNet.DE
> Service Network | D-37085 Goettingen | http://www.SerNet.DE/
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/

---------------------------------
G. Allen Morris III

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/