diff options
author | obrien <obrien@FreeBSD.org> | 2000-12-09 09:35:55 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2000-12-09 09:35:55 +0000 |
commit | c2ee1dcc02035d781d6c70f06df7106979a9f870 (patch) | |
tree | 757810dc1fdd19be4c8125ccb9e8beb1aff3d929 /usr.sbin/pkg_install | |
parent | c174181f432119d1dae3f5e58ecc14c8d7b6f545 (diff) | |
download | FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.zip FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.tar.gz |
Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r-- | usr.sbin/pkg_install/add/perform.c | 5 | ||||
-rw-r--r-- | usr.sbin/pkg_install/lib/msg.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/pkg_install/add/perform.c b/usr.sbin/pkg_install/add/perform.c index a8bb500..9422c54 100644 --- a/usr.sbin/pkg_install/add/perform.c +++ b/usr.sbin/pkg_install/add/perform.c @@ -24,6 +24,7 @@ static const char rcsid[] = */ #include <err.h> +#include <paths.h> #include "lib.h" #include "add.h" @@ -363,9 +364,9 @@ pkg_do(char *pkg) printf("Running mtree for %s..\n", PkgName); p = find_plist(&Plist, PLIST_CWD); if (Verbose) - printf("mtree -U -f %s -d -e -p %s >/dev/null\n", MTREE_FNAME, p ? p->name : "/"); + printf("mtree -U -f %s -d -e -p %s >%s\n", MTREE_FNAME, p ? p->name : "/", _PATH_DEVNULL); if (!Fake) { - if (vsystem("/usr/sbin/mtree -U -f %s -d -e -p %s >/dev/null", MTREE_FNAME, p ? p->name : "/")) + if (vsystem("/usr/sbin/mtree -U -f %s -d -e -p %s >%s", MTREE_FNAME, p ? p->name : "/"), _PATH_DEVNULL) warnx("mtree returned a non-zero status - continuing"); } unlink(MTREE_FNAME); 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); |