Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Dec 2012 02:26:02 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r244063 - head/usr.bin/locate/locate
Message-ID:  <201212100226.qBA2Q2WY093690@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Mon Dec 10 02:26:01 2012
New Revision: 244063
URL: http://svnweb.freebsd.org/changeset/base/244063

Log:
  Give users a hint when their locate database is too small.
  
  Reviewed by:	wblock, gcooper
  Reviewed by:	"Lowell Gilbert" <lgfbsd@be-well.ilk.org>
  Approved by:	cperciva (implicit)
  MFC after:	3 weeks

Modified:
  head/usr.bin/locate/locate/locate.c

Modified: head/usr.bin/locate/locate/locate.c
==============================================================================
--- head/usr.bin/locate/locate/locate.c	Mon Dec 10 00:16:38 2012	(r244062)
+++ head/usr.bin/locate/locate/locate.c	Mon Dec 10 02:26:01 2012	(r244063)
@@ -292,7 +292,9 @@ 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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212100226.qBA2Q2WY093690>