Give users a hint when their locate database is too small.
Lars Engels
lars.engels at 0x20.net
Tue Nov 13 08:37:10 UTC 2012
On Mon, Nov 12, 2012 at 10:07:16PM -0500, Eitan Adler wrote:
> What do people think of this? Maybe /usr/libexec/locate.updatedb is a
> better pointer?
>
> commit fb03b777daf2c69bb9612902e38fdb25b256be72
> Author: Eitan Adler <lists at eitanadler.com>
> Date: Mon Nov 12 22:05:55 2012 -0500
>
> Give users a hint when their locate database is too small.
>
> Reviwed by: ???
> Approved by: ???
> MFC after: 3 weeks
>
> diff --git a/usr.bin/locate/locate/locate.c b/usr.bin/locate/locate/locate.c
> index b0faefb..f0c8c37 100644
> --- a/usr.bin/locate/locate/locate.c
> +++ b/usr.bin/locate/locate/locate.c
> @@ -292,7 +292,7 @@ search_mmap(db, s)
> err(1, "`%s'", db);
> len = sb.st_size;
> if (len < (2*NBG))
> - errx(1, "database too small: %s", db);
> + errx(1, "database too small: %s\nTry running
> /etc/periodic/weekly/310.locate", db);
>
> if ((p = mmap((caddr_t)0, (size_t)len,
> PROT_READ, MAP_SHARED,
>
Enlarge your .... database! ;-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20121113/e1b8a941/attachment.sig>
More information about the freebsd-hackers
mailing list