From c2ee1dcc02035d781d6c70f06df7106979a9f870 Mon Sep 17 00:00:00 2001 From: obrien Date: Sat, 9 Dec 2000 09:35:55 +0000 Subject: Add `_PATH_DEVZERO'. Use _PATH_* where where possible. --- usr.sbin/pkg_install/lib/msg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.sbin/pkg_install/lib') 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 +#include #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); -- cgit v1.1