diff options
author | eadler <eadler@FreeBSD.org> | 2012-12-10 02:26:01 +0000 |
---|---|---|
committer | eadler <eadler@FreeBSD.org> | 2012-12-10 02:26:01 +0000 |
commit | 641397eb9a7e8ad64ec02351d1a77decf3be058e (patch) | |
tree | 76db31b97a934f78724dd8d250c55e8928b89582 /usr.bin | |
parent | 02d140220459ba6c42ddbf51693b554bb5d358bc (diff) | |
download | FreeBSD-src-641397eb9a7e8ad64ec02351d1a77decf3be058e.zip FreeBSD-src-641397eb9a7e8ad64ec02351d1a77decf3be058e.tar.gz |
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
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/locate/locate/locate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/locate/locate/locate.c b/usr.bin/locate/locate/locate.c index b0faefb..3a87b14 100644 --- a/usr.bin/locate/locate/locate.c +++ b/usr.bin/locate/locate/locate.c @@ -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, |