summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/lib
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2000-12-09 09:35:55 +0000
committerobrien <obrien@FreeBSD.org>2000-12-09 09:35:55 +0000
commitc2ee1dcc02035d781d6c70f06df7106979a9f870 (patch)
tree757810dc1fdd19be4c8125ccb9e8beb1aff3d929 /usr.sbin/pkg_install/lib
parentc174181f432119d1dae3f5e58ecc14c8d7b6f545 (diff)
downloadFreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.zip
FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.tar.gz
Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
Diffstat (limited to 'usr.sbin/pkg_install/lib')
-rw-r--r--usr.sbin/pkg_install/lib/msg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/lib/msg.c b/usr.sbin/pkg_install/lib/msg.c
index 43dd7e6..068d305 100644
--- a/usr.sbin/pkg_install/lib/msg.c
+++ b/usr.sbin/pkg_install/lib/msg.c
@@ -25,6 +25,7 @@ static const char rcsid[] =
*/
#include <err.h>
+#include <paths.h>
#include "lib.h"
/* Die a relatively simple death */
@@ -51,10 +52,10 @@ y_or_n(Boolean def, const char *msg, ...)
* Need to open /dev/tty because file collection may have been
* collected on stdin
*/
- tty = fopen("/dev/tty", "r");
+ tty = fopen(_PATH_TTY, "r");
if (!tty) {
cleanup(0);
- errx(2, "can't open /dev/tty!");
+ errx(2, "can't open %s!", _PATH_TTY);
}
while (ch != 'Y' && ch != 'N') {
vfprintf(stderr, msg, args);
OpenPOWER on IntegriCloud