diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2000-12-09 09:35:55 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2000-12-09 09:35:55 +0000 |
commit | 1a37aa566b347fbb2d2196786e1e84a79ffea9d5 (patch) | |
tree | a816cae9543dbb9277a62d68a91416fb2fb33da3 /usr.sbin/pkg_install | |
parent | 2961fc5ac412eec93a03d4badbbf4e01918d864a (diff) | |
download | src-1a37aa566b347fbb2d2196786e1e84a79ffea9d5.tar.gz src-1a37aa566b347fbb2d2196786e1e84a79ffea9d5.zip |
Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
Notes
Notes:
svn path=/head/; revision=69793
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 a8bb50004576..9422c5421bf8 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 43dd7e6eb394..068d305a2e31 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); |