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
This commit is contained in:
parent
02d1402204
commit
641397eb9a
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user