diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2002-02-19 20:20:40 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2002-02-19 20:20:40 +0000 |
commit | 8789f26b577f9fb99c7ff1a091096ab040bb2f70 (patch) | |
tree | 1ac759b8acc3b3862b6ff3176ead3f426fde3d3f | |
parent | 4133d0f0969f6ca5dbfed5f2205c3d62f2ece9d4 (diff) |
Use opendev(3) rather than open(2) to please lazy people like me that
don't want to type "/dev/".
It's somewhat an abuse of opendev(), but millert@ said it was ok.
-rw-r--r-- | usr.sbin/hilinfo/Makefile | 4 | ||||
-rw-r--r-- | usr.sbin/hilinfo/hilinfo.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/hilinfo/Makefile b/usr.sbin/hilinfo/Makefile index 432c2ffdf60..756730ca089 100644 --- a/usr.sbin/hilinfo/Makefile +++ b/usr.sbin/hilinfo/Makefile @@ -1,8 +1,10 @@ -# $OpenBSD: Makefile,v 1.4 2002/02/19 19:51:54 miod Exp $ +# $OpenBSD: Makefile,v 1.5 2002/02/19 20:20:39 miod Exp $ .if ${MACHINE}=="hp300" PROG= hilinfo CFLAGS+= -I${.CURDIR}/../../sys/arch/hp300 +DPADD= ${LIBUTIL} +LDADD= -lutil .else NOPROG=yes .endif diff --git a/usr.sbin/hilinfo/hilinfo.c b/usr.sbin/hilinfo/hilinfo.c index 7f566ae0be7..22f95dc305c 100644 --- a/usr.sbin/hilinfo/hilinfo.c +++ b/usr.sbin/hilinfo/hilinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hilinfo.c,v 1.3 2002/02/19 19:51:54 miod Exp $ */ +/* $OpenBSD: hilinfo.c,v 1.4 2002/02/19 20:20:39 miod Exp $ */ /* * Copyright (c) 1987-1993, The University of Utah and * the Center for Software Science at the University of Utah (CSS). @@ -25,6 +25,7 @@ #include <errno.h> #include <stdio.h> #include <unistd.h> +#include <util.h> #include <sys/types.h> #include <sys/ioctl.h> #include <dev/hilioctl.h> @@ -100,7 +101,7 @@ getinfo(dname) { int f; - f = open(dname, 0); + f = opendev(dname, 0, OPENDEV_BLCK, NULL); if (f < 0) { warn("open(%s)", dname); return 0; |