summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1999-05-22 17:35:48 +0000
committerdfr <dfr@FreeBSD.org>1999-05-22 17:35:48 +0000
commit0ff387396e738dc73c44daeab2659be2154ed750 (patch)
treed186677ffacc74e9ff7dd570c4e64a8dd14b00cf
parent345a2a7d8e7e1cf1fedabe824a70a746764f7574 (diff)
downloadFreeBSD-src-0ff387396e738dc73c44daeab2659be2154ed750.zip
FreeBSD-src-0ff387396e738dc73c44daeab2659be2154ed750.tar.gz
Port pnpinfo to alpha.
-rw-r--r--contrib/pnpinfo/pnpinfo.c14
-rw-r--r--usr.sbin/Makefile4
-rw-r--r--usr.sbin/pnpinfo/Makefile6
3 files changed, 17 insertions, 7 deletions
diff --git a/contrib/pnpinfo/pnpinfo.c b/contrib/pnpinfo/pnpinfo.c
index 7c1751f..f37c3f4 100644
--- a/contrib/pnpinfo/pnpinfo.c
+++ b/contrib/pnpinfo/pnpinfo.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pnpinfo.c,v 1.3 1998/09/13 22:15:44 eivind Exp $
+ * $Id: pnpinfo.c,v 1.4 1999/05/04 16:59:42 luoqi Exp $
*/
#include <sys/time.h>
@@ -578,16 +578,22 @@ isolation_protocol()
}
-void
-main()
+int
+main(int argc, char **argv)
{
int num_pnp_devs;
+#ifdef __i386__
/* Hey what about a i386_iopl() call :) */
if (open("/dev/io", O_RDONLY) < 0) {
fprintf (stderr, "pnpinfo: Can't get I/O privilege.\n");
exit (1);
}
+#endif
+#ifdef __alpha__
+ ioperm(0x203, 0x400 - 0x203, 1);
+#endif
+
printf("Checking for Plug-n-Play devices...\n");
/* Try various READ_DATA ports from 0x203-0x3ff */
@@ -599,6 +605,6 @@ main()
}
if (!num_pnp_devs) {
printf("No Plug-n-Play devices were found\n");
- return;
+ return 0;
}
}
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile
index 1f99083..1faad92 100644
--- a/usr.sbin/Makefile
+++ b/usr.sbin/Makefile
@@ -1,5 +1,5 @@
# From: @(#)Makefile 5.20 (Berkeley) 6/12/93
-# $Id: Makefile,v 1.154 1999/05/05 07:37:03 wpaul Exp $
+# $Id: Makefile,v 1.155 1999/05/10 10:17:00 obrien Exp $
# XXX MISSING: mkproto
SUBDIR= IPXrouted \
@@ -56,6 +56,7 @@ SUBDIR= IPXrouted \
pciconf \
periodic \
pkg_install \
+ pnpinfo \
portmap \
ppp \
pppctl \
@@ -128,7 +129,6 @@ SUBDIR+=apm \
mixer \
mptable \
pcvt \
- pnpinfo \
rndcontrol \
sgsc \
sicontrol \
diff --git a/usr.sbin/pnpinfo/Makefile b/usr.sbin/pnpinfo/Makefile
index 3b87871..2a89d8a 100644
--- a/usr.sbin/pnpinfo/Makefile
+++ b/usr.sbin/pnpinfo/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 1997/09/19 15:41:57 jmg Exp $
+# $Id: Makefile,v 1.2 1998/03/12 12:54:25 eivind Exp $
PROG= pnpinfo
@@ -6,6 +6,10 @@ SRCS= pnpinfo.c
CFLAGS+=-I${.CURDIR}/../../sys
MAN8= pnpinfo.8
+.if ${MACHINE_ARCH} == "alpha"
+LDADD+= -lio
+.endif
+
.PATH: ${.CURDIR}/../../contrib/pnpinfo
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud