Date: Tue, 13 Nov 2012 09:37:09 +0100 From: Lars Engels <lars.engels@0x20.net> To: Eitan Adler <lists@eitanadler.com> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: Give users a hint when their locate database is too small. Message-ID: <20121113083709.GC96846@e-new.0x20.net> In-Reply-To: <CAF6rxgkXXmSsoPHNVe6RLGpQ1C-qUq_y4YQSo3YgPhAeTdJAyQ@mail.gmail.com> References: <CAF6rxgkXXmSsoPHNVe6RLGpQ1C-qUq_y4YQSo3YgPhAeTdJAyQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--eRtJSFbw+EEWtPj3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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? >=20 > commit fb03b777daf2c69bb9612902e38fdb25b256be72 > Author: Eitan Adler <lists@eitanadler.com> > Date: Mon Nov 12 22:05:55 2012 -0500 >=20 > Give users a hint when their locate database is too small. >=20 > Reviwed by: ??? > Approved by: ??? > MFC after: 3 weeks >=20 > diff --git a/usr.bin/locate/locate/locate.c b/usr.bin/locate/locate/locat= e.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 =3D 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); >=20 > if ((p =3D mmap((caddr_t)0, (size_t)len, > PROT_READ, MAP_SHARED, >=20 Enlarge your .... database! ;-) --eRtJSFbw+EEWtPj3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCiBrUACgkQKc512sD3afj3mgCfQBf0+cjXnsP/BXKyBNjNn8Vn CLoAn0REvYsefzf0LRKzl5UdhIoMpb92 =vfFD -----END PGP SIGNATURE----- --eRtJSFbw+EEWtPj3--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121113083709.GC96846>