diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2015-05-27 01:19:58 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2015-05-27 01:19:58 +0000 |
commit | 98e0ffaefb0f241cda3a72395d3be04192ae0d47 (patch) | |
tree | 55c065b6730aaac2afb6c29933ee6ec5fa4c4249 /usr.bin/whereis | |
parent | b17ff922d4072ae132ece458f5b5d74a236880ac (diff) | |
parent | e81032ad243db32b8fd615b2d55ee94b9f6a5b6a (diff) | |
download | src-98e0ffaefb0f241cda3a72395d3be04192ae0d47.tar.gz src-98e0ffaefb0f241cda3a72395d3be04192ae0d47.zip |
Merge sync of head
Notes
Notes:
svn path=/projects/bmake/; revision=283595
Diffstat (limited to 'usr.bin/whereis')
-rw-r--r-- | usr.bin/whereis/pathnames.h | 3 | ||||
-rw-r--r-- | usr.bin/whereis/whereis.1 | 3 | ||||
-rw-r--r-- | usr.bin/whereis/whereis.c | 5 |
3 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/whereis/pathnames.h b/usr.bin/whereis/pathnames.h index 1668d9061aa3..f5d27d184f2d 100644 --- a/usr.bin/whereis/pathnames.h +++ b/usr.bin/whereis/pathnames.h @@ -25,9 +25,8 @@ * $FreeBSD$ */ -/* Where to look for libexec and games */ +/* Where to look for libexec */ #define PATH_LIBEXEC "/usr/libexec" -#define PATH_GAMES "/usr/games" /* Where to look for sources. */ #define PATH_SOURCES \ diff --git a/usr.bin/whereis/whereis.1 b/usr.bin/whereis/whereis.1 index a5b2899f798a..e72911c4fb43 100644 --- a/usr.bin/whereis/whereis.1 +++ b/usr.bin/whereis/whereis.1 @@ -65,8 +65,7 @@ The default path searched is the string returned by the utility for the .Dq user.cs_path string, with -.Pa /usr/libexec , -.Pa /usr/games +.Pa /usr/libexec and the current user's .Ev $PATH appended. diff --git a/usr.bin/whereis/whereis.c b/usr.bin/whereis/whereis.c index 401461fb0f80..ed8d93abb053 100644 --- a/usr.bin/whereis/whereis.c +++ b/usr.bin/whereis/whereis.c @@ -265,7 +265,7 @@ defaults(void) opt_b = opt_m = opt_s = 1; /* -b defaults to default path + /usr/libexec + - * /usr/games + user's path */ + * user's path */ if (!bindirs) { if (sysctlbyname("user.cs_path", (void *)NULL, &s, (void *)NULL, 0) == -1) @@ -276,11 +276,10 @@ defaults(void) err(EX_OSERR, "sysctlbyname(\"user.cs_path\")"); nele = 0; decolonify(b, &bindirs, &nele); - bindirs = realloc(bindirs, (nele + 3) * sizeof(char *)); + bindirs = realloc(bindirs, (nele + 2) * sizeof(char *)); if (bindirs == NULL) abort(); bindirs[nele++] = PATH_LIBEXEC; - bindirs[nele++] = PATH_GAMES; bindirs[nele] = NULL; if ((cp = getenv("PATH")) != NULL) { /* don't destroy the original environment... */ |