diff options
author | hosokawa <hosokawa@FreeBSD.org> | 2000-01-14 02:17:57 +0000 |
---|---|---|
committer | hosokawa <hosokawa@FreeBSD.org> | 2000-01-14 02:17:57 +0000 |
commit | 5955c7b34496a4da6142bb7a85bdab015975afce (patch) | |
tree | c9187df1ae644bd4467a0cf27c492451c872cb09 /release/sysinstall | |
parent | 3e7d8837770cd977fa12f623b643c4a90c566501 (diff) | |
download | FreeBSD-src-5955c7b34496a4da6142bb7a85bdab015975afce.zip FreeBSD-src-5955c7b34496a4da6142bb7a85bdab015975afce.tar.gz |
Eliminate PC-card installation floppy and add PC-card support for
generic installation floppy.
Diffstat (limited to 'release/sysinstall')
-rw-r--r-- | release/sysinstall/Makefile | 13 | ||||
-rw-r--r-- | release/sysinstall/main.c | 3 | ||||
-rw-r--r-- | release/sysinstall/pccard.c | 22 | ||||
-rw-r--r-- | release/sysinstall/sysinstall.h | 3 |
4 files changed, 18 insertions, 23 deletions
diff --git a/release/sysinstall/Makefile b/release/sysinstall/Makefile index f6dc252..00c3be2 100644 --- a/release/sysinstall/Makefile +++ b/release/sysinstall/Makefile @@ -5,7 +5,7 @@ BINDIR=/stand NOSHARED=YES CLEANFILES+= makedevs.c rtermcap rtermcap.tmp dumpnlist -CLEANFILES+= keymap.tmp keymap.h pccard_conf.h +CLEANFILES+= keymap.tmp keymap.h .PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum @@ -15,23 +15,14 @@ SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c kget.c \ label.c lndir.c main.c makedevs.c media.c menus.c misc.c mouse.c \ msg.c network.c nfs.c options.c package.c pccard.c \ system.c tape.c tcpip.c termcap.c ufs.c user.c variable.c wizard.c \ - keymap.h pccard_conf.h + keymap.h CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR} CFLAGS+= -I${.CURDIR}/../../sys -PCCARD?= NO - DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL} ${LIBDISK} ${LIBFTPIO} LDADD= -ldialog -lncurses -lmytinfo -lutil -ldisk -lftpio -pccard_conf.h: -.if ${PCCARD} == "YES" - echo "#define PCCARD 1" > pccard_conf.h -.else - echo "#undef PCCARD" > pccard_conf.h -.endif - makedevs.c: Makefile rtermcap keymap.h rm -f makedevs.tmp echo '#include <sys/types.h>' > makedevs.tmp diff --git a/release/sysinstall/main.c b/release/sysinstall/main.c index ad454ee..86f6bd3 100644 --- a/release/sysinstall/main.c +++ b/release/sysinstall/main.c @@ -35,7 +35,6 @@ */ #include "sysinstall.h" -#include "pccard_conf.h" #include <sys/signal.h> #include <sys/fcntl.h> @@ -88,10 +87,8 @@ main(int argc, char **argv) if (DebugFD) dup2(DebugFD, 2); -#ifdef PCCARD /* Initialize PC-card */ pccardInitialize(); -#endif /* Probe for all relevant devices on the system */ deviceGetAll(); diff --git a/release/sysinstall/pccard.c b/release/sysinstall/pccard.c index db18ab4..8d8c3ea 100644 --- a/release/sysinstall/pccard.c +++ b/release/sysinstall/pccard.c @@ -15,13 +15,10 @@ */ #include "sysinstall.h" -#include "pccard_conf.h" #include <sys/fcntl.h> #include <sys/time.h> #include <pccard/cardinfo.h> -#ifdef PCCARD - int pccard_mode = 0; DMenu MenuPCICMem = { @@ -83,6 +80,19 @@ pccardInitialize(void) return; } + sprintf(card_device, CARD_DEVICE, 0); + + if ((fd = open(card_device, O_RDWR)) < 0) { + msgDebug("Can't open PC-card controller %s.\n", + card_device); + return; + } + else if (msgYesNo("Found PC-card slot(s).\n" + "Use PC-card device as installation media?\n")) { + return; + } + close(fd); + dmenuOpenSimple(&MenuPCICMem, FALSE); spcic_mem = variable_get("_pcicmem"); dmenuOpenSimple(&MenuCardIRQ, FALSE); @@ -122,8 +132,6 @@ pccardInitialize(void) break; } - sprintf(card_device, CARD_DEVICE, 0); - w = savescr(); dialog_clear_norefresh(); msgConfirm("Now we start initializing PC-card controller and cards.\n" @@ -163,7 +171,3 @@ pccardInitialize(void) vsystem(pccardd_cmd); restorescr(w); } - -#endif /* PCCARD */ - - diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h index 2a4c618..43eeab0 100644 --- a/release/sysinstall/sysinstall.h +++ b/release/sysinstall/sysinstall.h @@ -691,6 +691,9 @@ extern int package_add(char *name); extern int package_extract(Device *dev, char *name, Boolean depended); extern Boolean package_exists(char *name); +/* pccard.c */ +extern void pccardInitialize(void); + /* system.c */ extern void systemInitialize(int argc, char **argv); extern void systemShutdown(int status); |