Date: Tue, 13 Nov 2012 10:55:02 -0500 From: Eitan Adler <lists@eitanadler.com> To: Warren Block <wblock@wonkity.com> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: Give users a hint when their locate database is too small. Message-ID: <CAF6rxgnA-prOCLh5w56dJBd3UsGMar_-ZYpoBT4OyRadVZAy2A@mail.gmail.com> In-Reply-To: <alpine.BSF.2.00.1211130731270.43524@wonkity.com> References: <CAF6rxgkXXmSsoPHNVe6RLGpQ1C-qUq_y4YQSo3YgPhAeTdJAyQ@mail.gmail.com> <alpine.BSF.2.00.1211130731270.43524@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 13 November 2012 09:33, Warren Block <wblock@wonkity.com> wrote: ... Ack to all. Final patch sent for approval: commit 33ed38e54bf7c7c5f0531afa5501f501e1a67279 Author: Eitan Adler <lists@eitanadler.com> Date: Mon Nov 12 22:05:55 2012 -0500 Give users a hint when their locate database is too small. Reviwed by: wblock Reviewed by: gcooper Reviwed by: "Lowell Gilbert" <lgfbsd@be-well.ilk.org> Approved by: cperciva MFC after: 3 weeks diff --git a/usr.bin/locate/locate/locate.c b/usr.bin/locate/locate/locate.c index b0faefb..95b3fed 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\nRun /usr/libexec/locate.updatedb", db); if ((p = mmap((caddr_t)0, (size_t)len, PROT_READ, MAP_SHARED, -- Eitan Adler
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxgnA-prOCLh5w56dJBd3UsGMar_-ZYpoBT4OyRadVZAy2A>