mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
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
a48a8ad7a5
commit
93d24a8730
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Reference in a new issue