aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/whereis
Commit message (Collapse)AuthorAgeFilesLines
* whereis: Fix list size calculation.Krzysztof Galazka2026-10-071-7/+19
| | | | | | | | | | | Use nitems() to calculate the number of elements in sourcepaths. Reviewed by: fernape@, ngie@ Approved by: ngie@ Fixes: 3963483523a4 Sponsored by: Intel Corporation Assisted-by: Github Copilot (GPT-5.6 Terra) Differential Revision: https://reviews.freebsd.org/D60368
* whereis(1): Simplify codeFernando Apesteguía2026-09-262-38/+37
| | | | | | | | | | | Simplify the way we build paths. Avoid decolonification of source paths. Remove gnu directories and add non-tracked ones. Fix a memory leak while here. Approved by: ngie@ Differential Revision: https://reviews.freebsd.org/D59846
* whereis(1): Fix style(9)Fernando Apesteguía2026-09-061-1/+1
| | | | | Reported by: ngie@ Differential Revision: https://reviews.freebsd.org/D42156
* whereis(1): Respect PORTSDIR variableFernando Apesteguía2026-09-062-18/+24
| | | | | | | | | | | | Respect PORTSDIR variable for those who have the ports collection in a different place than /usr/ports. PORTSDIR is a very common variable used in the ports framework and in /etc/make.conf among other places. While here, remove and old reference to CVS. Reviewed by: delphij@, ngie@ Approved by: ngie@ Differential Revision: https://reviews.freebsd.org/D42156
* Revert "whereis(1): Respect PORTSDIR variable"Fernando Apesteguía2026-08-302-69/+53
| | | | This reverts commit edadc3f9051595a9c2e693d8ab666a50b9e7a21a.
* whereis(1): Respect PORTSDIR variableFernando Apesteguía2026-08-292-53/+69
| | | | | | | | | PORTSDIR is a very common variable that points to the location of a ports directory. Make whereis(1) respect this variable too. Reviewed by: arrowd@, christos@ Approved by: christos@ Differential Revision: https://reviews.freebsd.org/D56845
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* usr.bin: Remove ancient SCCS tags.Warner Losh2023-11-271-2/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-3/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-122-2/+2
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-1/+0
|
* whereis: fix fetching of user.cs_path sysctl variableStefan Eßer2022-02-041-5/+5
| | | | | | | | | | | | | | | The current implementation of sysctlbyname() does not support the user sub-tree. This function exits with a return value of 0, but sets the passed string buffer to an empty string. As a result, the whereis program did not use the value of the sysctl variable "user.cs_path", but only the value of the environment variable "PATH". This update makes whereis use the sysctl function with a fixed OID, which already supports the user sub-tree. MFC after: 3 days
* whereis: remove gnu/libexec from source search pathsEd Maste2020-02-191-1/+1
| | | | | | | The last subdirectory of gnu/libexec was removed in r85742. Notes: svn path=/head/; revision=358111
* Silence Clang Scan warnings regarding the use of strcp().Stefan Eßer2019-01-241-9/+7
| | | | | | | | | | | | | | | | | | | | While these warnings are false positives, the use of strdup() instead of malloc() and strcpy() simplifies and clarifies the code. While checking the remaining uses of strcpy and strcat I noticed an assignment of a strlen() to a variable "s", whose value needs to be preserved for use in later output routines (where it is used to allocate a buffer). I do not think that the value of "s" will come out lower than its correct value and thus there is no risk of a buffer overflow, in the general case, but a specially crafter argument might lead to an overflow. The bogus assignment to "s" is removed since this value was only used a single time in the following malloc() call, which has been removed. MFC after: 2 weeks Notes: svn path=/head/; revision=343408
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-272-2/+6
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* usr.bin: minor spelling fixes on comments.Pedro F. Giffuni2016-05-011-1/+1
| | | | | | | No functional change. Notes: svn path=/head/; revision=298879
* Fix bad checking of the return of realloc(3)Baptiste Daroussin2016-04-201-1/+1
| | | | | | | | | Reported by: Coverity CID: 1007335 MFC after: 3 days Notes: svn path=/head/; revision=298371
* Use NULL instead of 0 for pointers.Marcelo Araujo2016-04-181-4/+4
| | | | | | | | | realloc will return NULL if it cannot allocate memory. MFC after: 2 weeks. Notes: svn path=/head/; revision=298184
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-273-7/+4
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Merge headSimon J. Gerraty2014-04-281-5/+1
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+19
| | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | Step 1 of eliminating the "games" distribution: Move binaries to /usr/bin;Colin Percival2015-02-123-7/+4
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=278616
* | multiple: Remove 3rd clause from BSD license where approved by theEitan Adler2014-03-141-5/+1
|/ | | | | | | | | | | | regents and renumber. This patch skips files in contrib/ and crypto/ Acked by: imp Discussed with: emaste Notes: svn path=/head/; revision=263142
* Reencode files from latin1 to UTF-8.Ulrich Spörlein2011-12-302-2/+2
| | | | | | | | | | This makes a tiny percentage of entries in calendars ugly for latin1 users, but fixes them for UTF-8 users. This badly needs a solution involving locale-dependent re-encoding. Notes: svn path=/head/; revision=228991
* Mark global functions and/or variables in whereis(1) static where possible.Ed Schouten2011-11-061-16/+16
| | | | | | | This allows compilers and static analyzers to more thorough analysis. Notes: svn path=/head/; revision=227244
* Build usr.bin/ with WARNS=6 by default.Ed Schouten2010-01-021-1/+0
| | | | | | | Also add some missing $FreeBSD$ to keep svn happy. Notes: svn path=/head/; revision=201386
* Make the search for sources in PATH_PORTS more accurate. I onlyJoerg Wunsch2008-06-201-2/+21
| | | | | | | | | | | | | noticed that a "whereis -qs qemu" matched the distfiles subdir of qemu rather than /usr/ports/emulators/qemu. It now ignores all dot entries in /usr/ports, plus all entries starting with a capital letter (maintenance stuff like Templates, but also includes subdir CVS), plus /usr/ports/distfiles which is simply a magic name in that respect. Notes: svn path=/head/; revision=179888
* Remove unused variables.Stefan Farfeleder2005-04-091-2/+1
| | | | Notes: svn path=/head/; revision=144840
* Fixed usage().Ruslan Ermilov2005-02-101-2/+3
| | | | Notes: svn path=/head/; revision=141657
* Let bsd.prog.mk set SRCS and MAN to their default values.Ruslan Ermilov2005-01-281-1/+0
| | | | Notes: svn path=/head/; revision=140941
* Respect locale settings from the environment.Tim J. Robbins2004-07-151-0/+3
| | | | Notes: svn path=/head/; revision=132198
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-6/+12
| | | | Notes: svn path=/head/; revision=131491
* Adjust max WARNs for sparc64.David E. O'Brien2002-12-301-2/+1
| | | | Notes: svn path=/head/; revision=108436
* mdoc(7) police: markup polishing.Ruslan Ermilov2002-11-261-3/+3
| | | | | | | Approved by: re Notes: svn path=/head/; revision=107276
* Use correct document date for the -a option.Johan Karlsson2002-08-221-1/+1
| | | | Notes: svn path=/head/; revision=102247
* Add the -a option to report all matches instead of only theJohan Karlsson2002-08-223-57/+145
| | | | | | | | | first of each requested type. Approved by: joerg, sheldonh (mentor) Notes: svn path=/head/; revision=102246
* Correctly handle empty path arguments, e.g., whereis -S -f biff.Johan Karlsson2002-08-181-7/+3
| | | | | | | Approved by: joerg, sheldonh (mentor) Notes: svn path=/head/; revision=102072
* Define all paths in pathnames.hJohan Karlsson2002-07-252-2/+6
| | | | | | | Approved by: joerg, sheldonh (mentor) Notes: svn path=/head/; revision=100691
* Teach whereis(1) about games.Johan Karlsson2002-07-243-5/+9
| | | | | | | Approved by: joerg, sheldonh (mentor) Notes: svn path=/head/; revision=100608
* The .Nm utilityPhilippe Charnier2002-07-141-1/+1
| | | | Notes: svn path=/head/; revision=99970