Commit Graph

63 Commits

Author SHA1 Message Date
hubertf 4841b75981 sign over my copyright to TNF 2008-09-22 13:10:25 +00:00
lukem 98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
msaitoh 8ce1f4fff2 fix typos 2007-04-29 20:23:34 +00:00
christos 328064d112 Redo the previous change so that we can ignore access errors from find,
but also tell when writing to the output file failed, by using a pipeline
to cat. While here change `` to $(). Otherwise this would always fail
since it is ran as nobody and therefore it cannot access some files. Reported
by smb.
2006-04-23 03:04:08 +00:00
dyoung dd269ac542 This patch removes one possible cause for a prolonged "out of disk"
condition on /tmp/:  if creating the file list ($FILELIST) fails,
immediately exit with a non-zero result code.  This fixes a bug
where, if the file list filled /tmp/, updatedb.sh would nevertheless
run for several minutes before it removed the file list as it quit.
2006-02-26 03:00:16 +00:00
christos 557f9b049f PR/32799: David H. Gutteridge: Apparent off-by-one error in locate(1) causes
incorrect behaviour when entries with the maximum path length are encountered
2006-02-12 00:45:01 +00:00
hubertf 8457054037 Make it clear where this program can be found.
Requested by wiz.
2005-10-05 17:38:49 +00:00
hubertf e533c36a54 Add locate.updatedb(8).
Discovered missing while sorting things out for BSDcertification.org.
Ran through wizd(8).
2005-10-05 06:29:03 +00:00
lukem 1efa87943c Rework "ignorefs" behaviour:
*	types are added to (rather than overriding) the default list
    *	Still use "ignorefs none" to clear the list (including the default list)
    *	Fix argument parsing when using "none"
This makes "ignorefs" much more useful if you just want to add another
fstype to the default list.

Simplify variable assignment.
2004-04-19 01:05:22 +00:00
lukem 1df7609f71 xref locate.conf(5) 2004-04-19 00:32:44 +00:00
itohy 0822f845c4 Use /etc/locate.conf for configuration, per discussion at tech-userlevel. 2004-02-06 14:29:51 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
christos dfeeeb0064 remove -g accidentally committed 2003-04-07 04:01:32 +00:00
christos 0a5854c253 - stricter bad file format checks
- KNF
- use LIST macros
2003-04-07 04:00:59 +00:00
wiz 2572f504d7 Replace > by \*[Gt] for HTML output. 2003-04-05 17:57:47 +00:00
perry 87cbf08503 Move exit status information to EXIT STATUS section, and note that we
exit >0 if errors such as missing or corrupted database files are
encountered.
2003-04-05 16:46:00 +00:00
perry fa066122ba 1) print an error and exit if fed a directory as a database
Patch submitted by Soren Jacobsen in PR bin/21016, but
   heavily edited by me.
2) error and exit out if you can't open a database instead of just
   warning and going on.
2003-04-05 16:36:38 +00:00
christos cf0848bff3 PR/13629: Rick Byers: Don't trust data from the database file. 2003-04-03 01:20:26 +00:00
lukem 5d4973fe97 makefile delint. use NETBSDSRCDIR as appropriate 2002-09-18 14:00:33 +00:00
kim 21e9aa7fd6 Quote $FILELIST and $BIGRAMS consistently. Especially the latter
can elicit "usage" from locate.code at runtime.
2002-05-05 07:27:35 +00:00
tv 8e6f7afb5b MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
wiz e8ae3ab788 Empty line -> .Pp. 2001-12-01 20:33:02 +00:00
wiz aded0d2cce Whitespace cleanup. 2001-12-01 16:43:07 +00:00
lukem 22fed3d22d exclude cd9660 and procfs as well. fixes PRs [bin/8454] and [bin/14006] 2001-11-07 15:31:41 +00:00
lukem c72849267d use mktemp(1) to safely create the temporary file.
fixes [security/12915] from David Sainty.
2001-06-18 11:10:25 +00:00
jdolecek ef163d60fa Trap also SIGHUP and SIGQUIT. Suggested by Jim Bernard & Christos
some time ago.
2001-05-14 14:58:59 +00:00
jdolecek 5cf4138b21 Don't exit with status 1 for successfull (non-interrupted) run.
Reported and patch provided in bin/12372 by Jim Bernard.
2001-03-12 13:29:26 +00:00
mycroft 73816a58f3 Do not count the end of a line in the bigram table. Newlines are stripped
before coding anyway, and the bigram output was screwing up (and often
pessimising) the table.
2000-05-06 10:26:45 +00:00
mycroft e8509e9145 Adjust the previous change to not generate garbage databases. 2000-05-06 10:02:06 +00:00
mycroft e29ea15050 Always wrap the bigram string in double quotes, in case it contains spaces.
Some other trivial cleanup.
2000-04-29 21:41:19 +00:00
jdolecek 5ab45b31f7 Convert updatedb script from C-shell to bourne shell. 2000-04-20 15:40:28 +00:00
simonb a04e169a80 Include <string.h> to get a prototype for memset(). Fixes build
problems on alpha noted by Tim Rightnour on current-users.
2000-03-22 21:45:02 +00:00
jdolecek 79176095e8 locate.bigram does all the bigram processing itself now; store it's result
in local variable and pass the value to locate.code directly instead
of using temporary file

always remove $filelist, even if an error is encountered
2000-03-20 19:22:55 +00:00
jdolecek e3f9e89eb9 the first args is expected to be the bigrams array, instead of name of
file holding it
2000-03-20 19:18:34 +00:00
jdolecek a46f4702f8 Do all bigram processing here, instead of in updatedb.csh; saves
a few cycles (it's runs like 2 seconds instead of 16) and the algorithm
is hopefully a bit more clear
2000-03-20 19:17:35 +00:00
jdolecek c3678e83f5 s/appears/appeared/ 2000-03-10 15:15:32 +00:00
itohy 34d0aa38df Use -s (sort) option of find(1) to reduce usage of temprary storage by sort(1). 2000-03-10 11:51:25 +00:00
tron 842860915e Use "/tmp" and not "/var/tmp" as default temporary directory as suggested
by Thilo Manske in PR bin/9535.
2000-03-06 11:24:55 +00:00
sjg 84a0eb9650 Add support for multiple locate databases via $LOCATE_PATH and/or
command line switch.
Also exit(0) only if a match is found.
1999-08-16 01:41:16 +00:00
garbled 9e44e9b578 More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:16:34 +00:00
lukem dcab0210a0 convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
1999-02-13 02:54:17 +00:00
hubertf 586b407bf5 Mention /usr/libexec/locate.updatedb, weekly.conf(5)
as per PR 5929 by Patrick Welche <prlw1@cam.ac.uk>
1998-08-08 14:49:23 +00:00
lukem 8ba07ab0b3 use CPPFLAGS instead of CFLAGS 1997-10-24 09:00:17 +00:00
lukem 2f6bf4134d WARNSify, fix .Nm usage, deprecate register 1997-10-19 04:11:51 +00:00
pk f890b048ac NULL => 0 (Arne Juul; PR#3629) 1997-05-17 19:47:50 +00:00
christos 3917c3179d - Makefile cleanups 1997-03-24 21:57:01 +00:00
thorpej 150c33e60b Use ${INSTALL}. 1996-10-18 05:55:26 +00:00
thorpej 81ed704e77 Fix tiny goof left over from the merge. 1995-09-01 23:48:13 +00:00
jtc 4d85334f0f Sync with 4.4lite2 1995-08-31 22:36:32 +00:00
jtc ba2cb090ad Fix typo, noted by Masanobu Saitoh in PR #1270 1995-07-25 18:20:25 +00:00