summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade
diff options
context:
space:
mode:
authormurray <murray@FreeBSD.org>2002-03-29 23:03:17 +0000
committermurray <murray@FreeBSD.org>2002-03-29 23:03:17 +0000
commit41b83afa5653182a481068caaf1c4ddd99ef3793 (patch)
tree6cdb8acff66e199590f5c4adb25ac58065d4c2f2 /usr.sbin/sade
parente27cdad86b33fbd4bf417817edfc51955552a318 (diff)
downloadFreeBSD-src-41b83afa5653182a481068caaf1c4ddd99ef3793.zip
FreeBSD-src-41b83afa5653182a481068caaf1c4ddd99ef3793.tar.gz
Only build and link the pccard module on architectures that support it (and
that have room for pccardd on mfsroot.flp).
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r--usr.sbin/sade/Makefile6
-rw-r--r--usr.sbin/sade/main.c2
-rw-r--r--usr.sbin/sade/menus.c2
-rw-r--r--usr.sbin/sade/sade.h3
4 files changed, 12 insertions, 1 deletions
diff --git a/usr.sbin/sade/Makefile b/usr.sbin/sade/Makefile
index ec921e0..2320d95 100644
--- a/usr.sbin/sade/Makefile
+++ b/usr.sbin/sade/Makefile
@@ -6,10 +6,14 @@ SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c \
disks.c dispatch.c dist.c dmenu.c doc.c dos.c floppy.c \
ftp.c globals.c http.c index.c install.c installUpgrade.c keymap.c \
label.c main.c makedevs.c media.c menus.c misc.c modules.c \
- mouse.c msg.c network.c nfs.c options.c package.c pccard.c \
+ mouse.c msg.c network.c nfs.c options.c package.c \
system.c tape.c tcpip.c termcap.c ttys.c ufs.c usb.c user.c \
variable.c wizard.c keymap.h
+.if ${MACHINE_ARCH} == "i386"
+SRCS+= pccard.c
+.endif
+
CFLAGS+= -I${.CURDIR}/../../gnu/lib/libdialog -I.
.if ${MACHINE} == "pc98"
CFLAGS+= -DPC98
diff --git a/usr.sbin/sade/main.c b/usr.sbin/sade/main.c
index db56dc0..144a617 100644
--- a/usr.sbin/sade/main.c
+++ b/usr.sbin/sade/main.c
@@ -111,10 +111,12 @@ main(int argc, char **argv)
}
/* Initialize PC-card, if we haven't already done so. */
+#ifdef PCCARD_ARCH
if (!pvariable_get("pccardInitialize")) {
pccardInitialize();
pvariable_set("pccardInitialize=1");
}
+#endif
/* Initialize USB, if we haven't already done so. */
if (!pvariable_get("usbInitialize")) {
diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c
index eb89024..3a197b6 100644
--- a/usr.sbin/sade/menus.c
+++ b/usr.sbin/sade/menus.c
@@ -1292,12 +1292,14 @@ DMenu MenuStartup = {
checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
{ " APM", "Auto-power management services (typically laptops)",
dmenuVarCheck, dmenuToggleVariable, NULL, "apm_enable=YES" },
+#ifdef PCCARD_ARCH
{ " pccard", "Enable PCCARD (AKA PCMCIA) services (also laptops)",
dmenuVarCheck, dmenuToggleVariable, NULL, "pccard_enable=YES" },
{ " pccard mem", "Set PCCARD memory address (if enabled)",
dmenuVarCheck, dmenuISetVariable, NULL, "pccard_mem" },
{ " pccard ifconfig", "List of PCCARD ethernet devices to configure",
dmenuVarCheck, dmenuISetVariable, NULL, "pccard_ifconfig" },
+#endif
{ " usbd", "Enable USB daemon (detect USB attach / detach)",
dmenuVarCheck, dmenuToggleVariable, NULL, "usbd_enable=YES" },
{ " usbd flags", "Set default flags to usbd (if enabled)",
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index 7ee69c1..a0b26a5 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -54,6 +54,9 @@
/*** Defines ***/
+#if defined(__i386__) || defined(PC98)
+#define PCCARD_ARCH 1 /* Support PCCARD installations */
+#endif
/* device limits */
#define DEV_NAME_MAX 64 /* The maximum length of a device name */
#define DEV_MAX 100 /* The maximum number of devices we'll deal with */
OpenPOWER on IntegriCloud