From 11d9aa670723f508821f2bf6980a555360783a80 Mon Sep 17 00:00:00 2001 From: Colin Percival Date: Thu, 12 Feb 2015 05:35:00 +0000 Subject: Step 1 of eliminating the "games" distribution: Move binaries to /usr/bin; update paths; and include everything in the "base" distribution. The "games" distribution being optional made sense when there were more games and we had small disks; but the "games-like" games were moved into the ports tree a dozen years ago and the remaining "utility-like" games occupy less than 0.001% of my laptop's small hard drive. Meanwhile every new user is confronted by the question "do you want games installed" when they they try to install FreeBSD. The next steps will be: 2. Removing punch card (bcd, ppt), phase-of-moon (pom), clock (grdc), and caesar cipher (caesar, rot13) utilities. I intend to keep fortune, factor, morse, number, primes, and random, since there is evidence that those are still being used. 3. Merging src/games into src/usr.bin. This change will not be MFCed. Reviewed by: jmg Discussed at: EuroBSDCon Approved by: gjb (release-affecting changes) --- usr.bin/whereis/pathnames.h | 3 +-- usr.bin/whereis/whereis.1 | 3 +-- usr.bin/whereis/whereis.c | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) (limited to 'usr.bin/whereis') 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... */ -- cgit v1.2.3