Make SCSI stuff truly optional.

Noticed by:	jhay
This commit is contained in:
Jordan K. Hubbard 1998-09-16 09:25:20 +00:00
parent 9cf0e9186b
commit 0d4651753d
4 changed files with 16 additions and 7 deletions

View File

@ -16,7 +16,7 @@ SRCS= anonFTP.c attr.c cdrom.c command.c config.c devices.c \
msg.c network.c nfs.c options.c package.c register.c system.c \
tape.c tcpip.c termcap.c ufs.c user.c variable.c wizard.c \
uc_eisa.c uc_isa.c uc_kmem.c uc_list.c uc_main.c uc_pci.c \
uc_scsi.c keymap.h
keymap.h
CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR}
CFLAGS+= -I${.CURDIR}/../../sys

View File

@ -24,7 +24,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* library functions for userconfig library
*
* $Id$
* $Id: uc_main.c,v 1.18 1997/02/22 14:12:31 peter Exp $
*/
#include <sys/types.h>
@ -53,9 +53,11 @@ static struct nlist _nl[] = {
{"_pcidevice_set"},
{"_device_list"},
{"_scbusses"},
#ifdef USE_SCSI
{"_scsi_cinit"},
{"_scsi_dinit"},
{"_scsi_tinit"},
#endif
{""},
};
@ -232,9 +234,10 @@ uc_close(struct kernel *kern, int writeback)
if (kern->pci_devp)
pci_free(kern, writeback); /* or here */
#ifdef USE_SCSI
if (kern->scsi_devp)
scsi_free(kern, writeback);
#endif
if (!kern->incore)
munmap(kern->core, kern->size);
@ -262,9 +265,11 @@ uc_getdev(struct kernel *kern, char *dev)
if (kern->pci_devp)
list_append(list, "pci");
#ifdef USE_SCSI
if (kern->scsi_devp)
list_append(list, "scsi");
#endif
}
else if (strcmp(dev, "-isa") == 0)
list = get_isa_devlist(kern);
@ -272,8 +277,10 @@ uc_getdev(struct kernel *kern, char *dev)
list = get_eisa_devlist(kern);
else if (strcmp(dev, "-pci") == 0)
list = get_pci_devlist(kern);
#ifdef USE_SCSI
else if (strcmp(dev, "-scsi") == 0)
list = get_scsi_devlist(kern);
#endif
}
else {
/* we gotta figure out which real device to report */
@ -291,6 +298,7 @@ uc_getdev(struct kernel *kern, char *dev)
}
}
#ifdef USE_SCSI
if (kern->scsi_devp) {
for (sp = kern->scsi_devp; sp->device; sp++) {
if (strcmp(dev, sp->device) == 0) {
@ -299,7 +307,8 @@ uc_getdev(struct kernel *kern, char *dev)
}
}
}
#endif
if (kern->pci_devp) {
for(pp = kern->pci_devp; pp->device; pp++) {
if (strcmp(dev, pp->device) == 0) {

View File

@ -16,7 +16,7 @@ SRCS= anonFTP.c attr.c cdrom.c command.c config.c devices.c \
msg.c network.c nfs.c options.c package.c register.c system.c \
tape.c tcpip.c termcap.c ufs.c user.c variable.c wizard.c \
uc_eisa.c uc_isa.c uc_kmem.c uc_list.c uc_main.c uc_pci.c \
uc_scsi.c keymap.h
keymap.h
CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR}
CFLAGS+= -I${.CURDIR}/../../sys

View File

@ -16,7 +16,7 @@ SRCS= anonFTP.c attr.c cdrom.c command.c config.c devices.c \
msg.c network.c nfs.c options.c package.c register.c system.c \
tape.c tcpip.c termcap.c ufs.c user.c variable.c wizard.c \
uc_eisa.c uc_isa.c uc_kmem.c uc_list.c uc_main.c uc_pci.c \
uc_scsi.c keymap.h
keymap.h
CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR}
CFLAGS+= -I${.CURDIR}/../../sys