summaryrefslogtreecommitdiffstats
path: root/usr.bin/locate
Commit message (Collapse)AuthorAgeFilesLines
* MFH (r290742): don't index /var/db/freebsd-updatedes2016-01-262-2/+2
|
* MFC r264400,r265836:ngie2014-12-312-2/+2
| | | | | | | | | | | | | | r264400: NO_MAN= has been deprecated in favor of MAN= for some time, go ahead and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit. r265836: Remove last two NO_MAN= in the tree. In both of these cases, MAN= is what is needed.
* MFC r274847:dim2014-11-251-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following -Werror warnings from clang 3.5.0, while building usr.bin/locate: usr.bin/locate/locate/util.c:249:29: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value] MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i)); ^ usr.bin/locate/locate/util.c:249:29: note: remove the call to 'abs' since unsigned values cannot be negative MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i)); ^~~ usr.bin/locate/locate/util.c:274:32: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value] MAXPATHLEN, abs(word) < abs(htonl(word)) ? word : ^ usr.bin/locate/locate/util.c:274:32: note: remove the call to 'abs' since unsigned values cannot be negative MAXPATHLEN, abs(word) < abs(htonl(word)) ? word : ^~~ The problem is that ntohl() always returns an unsigned quantity. In this case, it's expected to be cast back to a signed integer, but to stop complaints about abs() we just store it into an integer, and don't call ntohl() again. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D1196
* Give users a hint when their locate database is too small.eadler2012-12-101-1/+3
| | | | | | | Reviewed by: wblock, gcooper Reviewed by: "Lowell Gilbert" <lgfbsd@be-well.ilk.org> Approved by: cperciva (implicit) MFC after: 3 weeks
* Touch up some more small typos missed in the previous round.uqs2012-01-051-3/+3
| | | | Reported by: Ben Kaduk <minimarmot@gmail.com> et al.
* Replace index() and rindex() calls with strchr() and strrchr().ed2012-01-032-5/+5
| | | | | | | | | | The index() and rindex() functions were marked LEGACY in the 2001 revision of POSIX and were subsequently removed from the 2008 revision. The strchr() and strrchr() functions are part of the C standard. This makes the source code a lot more consistent, as most of these C files also call into other str*() routines. In fact, about a dozen already perform strchr() calls.
* Spelling fixes for usr.bin/uqs2011-12-302-5/+5
|
* Properly use SCHAR_MAX instead of CHAR_MAX for 0x7f. This fixes operationnwhitehorn2010-11-231-4/+4
| | | | | | | | of locate(1) on systems on which char is unsigned by default (ARM and PowerPC). Reported by: Paul Mather MFC after: 4 days
* Style cleanup: make this look more like a 21st-century shell scriptwollman2010-11-011-25/+23
| | | | | | | and not something out of the early 1980s. Make sure all error messages go to stderr, not stdout. Since there's error-handling code to handle empty SEARCHPATHS and FILESYSTEMS, use the initialization form that allows this error to be diagnosed. (hat tip: jilles@)
* jilles@ pointed out that using ${PRUNEDIRS:=".zfs"} in updatedb.shwollman2010-11-011-1/+1
| | | | | | | | made it impossible to override PRUNEDIRS to make it empty. Use the non-colon form to only set PRUNEDIRS if it is completely unset. (For parallelism, the other configuration defaults here could be done the same way, but that could be more obviously accomplished by disabling updatedb in periodic.conf, so leave them alone for now.)
* Make it possible to exclude directories by name no matter where theywollman2010-10-312-1/+13
| | | | | | | are in the filesystem from the locate database. By default, exclude ".zfs" directories, as users who who have set snapdir=visible and are taking frequent snapshots most likely do not want the snapshots included in the locate database.
* Various changes to make locate compilable with WARNS=6. Note that theregavin2010-06-282-12/+13
| | | | | | | | is still one issue on FreeBSD/arm (signed vs unsigned char) which prevents actually bumping this to WARNS=6 - I'm still considering the correct solution to this issue. Tested by: make universe
* Build usr.bin/ with WARNS=6 by default.ed2010-01-022-0/+4
| | | | Also add some missing $FreeBSD$ to keep svn happy.
* Move the check to ensure the locate database has the minimum required sizejhb2009-07-242-3/+2
| | | | | | | | | | when using mmap() before invoking mmap(). This avoids a confusing error message when locate is invoked against a zero-size database after the recent change to make mmap() fail requests to map 0 bytes. Submitted by: Jaakko Heinonen jh of saunalahti dot fi Approved by: re (kensmith) MFC after: 1 week
* Signed/unsigned fixes, should be WARNS=2 clean now.delphij2009-04-021-3/+3
|
* Don't crash when we have an invalid count number.delphij2009-04-021-0/+2
| | | | | | PR: bin/32686 Submitted by: Jaakko Heinonen <jh saunalahti.fi> MFC after: 1 week
* Use RUSAGE_SELF for the current process instead of hardcoded valuekevlo2008-09-021-1/+1
|
* The previous version included too many file system types in the scan,se2007-10-172-3/+9
| | | | | | | | | | | | | | | | | | since "local" includes also synthetic file systems (e.g. /dev, /proc) and loopback mounts. This version uses lsvfs to identify file system types that are local and additionally not synthetik, loopback mounts, or read-only. This has been suggested by Craig Rodrigues half a year ago. The patch that has been committed is based on his suggestion, but slightly modified. The comments in locate.rc have been updated to reflect the change and o include zfs and xfs in the example file system parameter that can be used to override the default outlined above. PR: 114101 Submitted by: rodrigc at crodrigues dot org (Craig Rodrigues) MFC: 2 weeks
* Make the updatedb script installed as /usr/libexec/locate.updatedbse2007-10-151-1/+1
| | | | | | | | | | inspect all local file systems, not only ufs and ext2fs. A number of local file systems has been added over time, and at least zfs has the potential to become a popular choice. Without this change a ZFS root file system causes the script to ignore all file-systems and leads to an empty locate db. (An alternative is to add all the relevant file systems individually, which means that at least zfs, xfs, ntfs, ntfs-3g, msdosfs should be added, probably more).
* Update the default FILESYSTEMS value in a comment to note that ext2fs isjhb2007-07-191-1/+1
| | | | | | | included in the default list in the locate.updatedb script. Approved by: re (bmah) Inspired by: mwlucas
* Markup fixes.ru2006-09-291-6/+8
|
* Further nitpicking.ceri2006-08-171-13/+13
|
* Fix a grammatical error.ceri2006-08-171-1/+1
| | | | Funny how one character can completely distort the perception of a sentence :)
* o Sync usage() with reality.maxim2006-06-111-1/+1
|
* Add a -0 option for interoperability with xargs -0.des2005-12-073-4/+14
| | | | | | PR: bin/56558 Submitted by: Eugene Grosbein <eugen@grosbein.pp.ru> MFC after: 2 weeks
* Look through ext2fs file systems as well as ufs.grog2005-11-121-1/+1
| | | | | | This should almost certainly be extended to other local file systems as well (ntfs springs to mind), but I don't have the ability to test it.
* Most users probably aren't interested in locating 13000+ files namedcperciva2005-08-222-2/+2
| | | | | | | | [0-9a-f]{64}, so exclude portsnap's compressed snapshots from locate's indexing. Suggested by: silby MFC after: 3 days
* remove myself as maintainerwosch2005-07-171-2/+0
|
* Expand *n't contractions.ru2005-02-131-1/+1
|
* Include missing headers.stefanf2005-02-091-0/+1
|
* Sort sections.ru2005-01-182-12/+12
|
* Eliminate macro calls inside literal displays.ru2005-01-151-9/+6
|
* Start the dreaded NOFOO -> NO_FOO conversion.ru2004-12-212-2/+2
| | | | OK'ed by: core
* For variables that are only checked with defined(), don't provideru2004-10-242-2/+2
| | | | any fake value.
* Merge the "multibyte not supported" BUG into the pre-existing BUGScperciva2004-07-271-9/+9
| | | | | | | | | section. Move the HISTORY section to place it before BUGS rather than after BUGS, in order to minimize the chance of this error being reproduced in the future. (Both mdoc(7) and 63% of manual pages have these sections listed in this order.)
* Document incorrect handling of multibyte characters.tjr2004-07-231-1/+5
|
* Deal with double whitespace.ru2004-07-031-2/+2
|
* Mechanically kill hard sentence breaks.ru2004-07-021-6/+11
|
* The .Xr utilitycharnier2003-06-081-1/+2
|
* Drop support for COPY, -c has been the default mode of install(1)ru2002-07-291-1/+1
| | | | | | for a long time now. Approved by: bde
* Correct syntax error, remove the unescaped newline between "||" and thetjr2002-07-221-4/+2
| | | | | | | command it is intended to test. pdksh and bash caught this syntax error, sh(1) did not behave as intended. PR: 40386
* s/${INSTALL} -c/${INSTALL} ${COPY}/ru2002-07-181-1/+1
|
* The .Nm utilitycharnier2002-07-141-2/+3
|
* Fix grammar in 1 sentencetrhodes2002-07-021-3/+3
| | | | | | Reword 'Usually faster in most cases' to 'and is faster in most cases' PR: 40024 (partly)
* Fix unaligned access error.naddy2002-06-241-3/+6
| | | | Reviewed by: ticso
* Only got one of the Perl usages.obrien2002-06-231-2/+3
|
* Replace a perl usage with an AWK one.obrien2002-06-231-1/+1
| | | | Submitted by: Bob Willcox <bob@immure.com>
* Make locate.updatedb tell about the security risk when it is run as root.eivind2002-06-191-0/+5
|
* remove __Pimp2002-03-223-33/+26
|
* o Move NTOHL() and associated macros into <sys/param.h>. These aremike2002-02-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland. Tested on: alpha, i386 Reviewed by: bde, jake, tmm
OpenPOWER on IntegriCloud