diff options
author | 2016-03-07 21:47:04 +0000 | |
---|---|---|
committer | 2016-03-07 21:47:04 +0000 | |
commit | a72b3787e29a8bf29dc4de2b0380debbcb5e05c8 (patch) | |
tree | 31bc1eb22f29a81fa638894ac20bd05d30e7ca58 | |
parent | Remove unused fields posfile and was_pos_file from FILEDESC and (diff) | |
download | wireguard-openbsd-a72b3787e29a8bf29dc4de2b0380debbcb5e05c8.tar.xz wireguard-openbsd-a72b3787e29a8bf29dc4de2b0380debbcb5e05c8.zip |
Use opendev() instead of a plain open().
ok deraadt
-rw-r--r-- | sbin/clri/Makefile | 5 | ||||
-rw-r--r-- | sbin/clri/clri.c | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sbin/clri/Makefile b/sbin/clri/Makefile index 9b870e2beba..8be41f8662f 100644 --- a/sbin/clri/Makefile +++ b/sbin/clri/Makefile @@ -1,6 +1,9 @@ -# $OpenBSD: Makefile,v 1.3 1997/09/21 11:36:09 deraadt Exp $ +# $OpenBSD: Makefile,v 1.4 2016/03/07 21:47:04 natano Exp $ PROG= clri MAN= clri.8 +DPADD= ${LIBUTIL} +LDADD= -lutil + .include <bsd.prog.mk> diff --git a/sbin/clri/clri.c b/sbin/clri/clri.c index 23a3ac0a87a..972796a19a6 100644 --- a/sbin/clri/clri.c +++ b/sbin/clri/clri.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clri.c,v 1.18 2015/11/03 04:47:55 mmcc Exp $ */ +/* $OpenBSD: clri.c,v 1.19 2016/03/07 21:47:04 natano Exp $ */ /* $NetBSD: clri.c,v 1.19 2005/01/20 15:50:47 xtraeme Exp $ */ /* @@ -44,6 +44,7 @@ #include <string.h> #include <stdio.h> #include <unistd.h> +#include <util.h> /* * Possible superblock locations ordered from most to least likely. @@ -76,7 +77,7 @@ main(int argc, char *argv[]) sbp = NULL; /* get the superblock. */ - if ((fd = open(fs, O_RDWR, 0)) < 0) + if ((fd = opendev(fs, O_RDWR, 0, NULL)) < 0) err(1, "%s", fs); if (pledge("stdio", NULL) == -1) |