summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolay Sturm <sturm@cvs.openbsd.org>2006-03-14 22:30:54 +0000
committerNikolay Sturm <sturm@cvs.openbsd.org>2006-03-14 22:30:54 +0000
commitef6bb351fc1de0fa2eeec0873d730a30a1f7cb04 (patch)
tree50d0936aadbe1a414aa55084ac578a3aed87c195
parent91ea96b4b51dd194e9306faaf9480abded225b26 (diff)
install these on amd64
even though amd64 does not have apm support, this change permits hw.setperf manipulations via apm/apmd
-rw-r--r--usr.sbin/apm/Makefile9
-rw-r--r--usr.sbin/apmd/Makefile9
-rw-r--r--usr.sbin/apmd/apmd.c4
3 files changed, 12 insertions, 10 deletions
diff --git a/usr.sbin/apm/Makefile b/usr.sbin/apm/Makefile
index 484a0038245..1ad7a03e314 100644
--- a/usr.sbin/apm/Makefile
+++ b/usr.sbin/apm/Makefile
@@ -1,8 +1,9 @@
-# $OpenBSD: Makefile,v 1.10 2005/03/29 16:26:45 miod Exp $
+# $OpenBSD: Makefile,v 1.11 2006/03/14 22:30:53 sturm Exp $
-.if (${MACHINE} == "i386") || (${MACHINE} == "macppc") || \
- (${MACHINE} == "sparc") || (${MACHINE} == "zaurus")
+.if (${MACHINE} == "amd64") || (${MACHINE} == "i386") || \
+ (${MACHINE} == "macppc") || (${MACHINE} == "sparc") || \
+ (${MACHINE} == "zaurus")
SRCS= apm.c apmsubr.c
.PATH: ${.CURDIR}/../apmd
@@ -15,7 +16,7 @@ NOPROG=yes
.endif
MAN= apm.8
-MANSUBDIR=i386 macppc sparc zaurus
+MANSUBDIR=amd64 i386 macppc sparc zaurus
MLINKS= apm.8 zzz.8
.include <bsd.prog.mk>
diff --git a/usr.sbin/apmd/Makefile b/usr.sbin/apmd/Makefile
index d5754a377e8..3832b8578fd 100644
--- a/usr.sbin/apmd/Makefile
+++ b/usr.sbin/apmd/Makefile
@@ -1,7 +1,8 @@
-# $OpenBSD: Makefile,v 1.8 2005/03/29 16:26:45 miod Exp $
+# $OpenBSD: Makefile,v 1.9 2006/03/14 22:30:53 sturm Exp $
-.if (${MACHINE} == "i386") || (${MACHINE} == "macppc") || \
- (${MACHINE} == "sparc") || (${MACHINE} == "zaurus")
+.if (${MACHINE} == "amd64") || (${MACHINE} == "i386") || \
+ (${MACHINE} == "macppc") || (${MACHINE} == "sparc") || \
+ (${MACHINE} == "zaurus")
SRCS= apmd.c apmsubr.c
PROG= apmd
@@ -10,6 +11,6 @@ NOPROG=yes
.endif
MAN= apmd.8
-MANSUBDIR=i386 macppc sparc zaurus
+MANSUBDIR=amd64 i386 macppc sparc zaurus
.include <bsd.prog.mk>
diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c
index 13f8ba8a407..4d8f5b79ec0 100644
--- a/usr.sbin/apmd/apmd.c
+++ b/usr.sbin/apmd/apmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apmd.c,v 1.41 2006/01/19 19:17:10 sturm Exp $ */
+/* $OpenBSD: apmd.c,v 1.42 2006/03/14 22:30:53 sturm Exp $ */
/*
* Copyright (c) 1995, 1996 John T. Kohl
@@ -493,7 +493,7 @@ main(int argc, char *argv[])
(void) signal(SIGINT, sigexit);
if ((ctl_fd = open(fname, O_RDWR)) == -1) {
- if (errno != ENXIO)
+ if (errno != ENXIO && errno != ENOENT)
error("cannot open device file `%s'", fname);
} else if (fcntl(ctl_fd, F_SETFD, 1) == -1)
error("cannot set close-on-exec for `%s'", fname);