From b54fc31edcf49788fa933b84b9b9bb8c5bc97b9c Mon Sep 17 00:00:00 2001 From: johan Date: Thu, 25 Jul 2002 23:04:31 +0000 Subject: Define all paths in pathnames.h Approved by: joerg, sheldonh (mentor) --- usr.bin/whereis/pathnames.h | 4 ++++ usr.bin/whereis/whereis.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/whereis/pathnames.h b/usr.bin/whereis/pathnames.h index 569c72e..fce4274 100644 --- a/usr.bin/whereis/pathnames.h +++ b/usr.bin/whereis/pathnames.h @@ -25,6 +25,10 @@ * $FreeBSD$ */ +/* Where to look for libexec and games */ +#define PATH_LIBEXEC "/usr/libexec" +#define PATH_GAMES "/usr/games" + /* Where to look for sources. */ #define PATH_SOURCES \ "/usr/src/bin:/usr/src/usr.bin:/usr/src/sbin:" \ diff --git a/usr.bin/whereis/whereis.c b/usr.bin/whereis/whereis.c index b2a79d2..e78e089 100644 --- a/usr.bin/whereis/whereis.c +++ b/usr.bin/whereis/whereis.c @@ -274,8 +274,8 @@ defaults(void) bindirs = realloc(bindirs, (nele + 3) * sizeof(char *)); if (bindirs == NULL) abort(); - bindirs[nele++] = "/usr/libexec"; - bindirs[nele++] = "/usr/games"; + bindirs[nele++] = PATH_LIBEXEC; + bindirs[nele++] = PATH_GAMES; bindirs[nele] = NULL; if ((cp = getenv("PATH")) != NULL) { /* don't destroy the original environment... */ -- cgit v1.1