Major speed improvement.
This commit is contained in:
parent
90b0e68767
commit
ba95b05235
|
@ -39,7 +39,7 @@ static char copyright[] =
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
/*static char sccsid[] = "from: @(#)kvm_mkdb.c 8.1 (Berkeley) 6/6/93";*/
|
/*static char sccsid[] = "from: @(#)kvm_mkdb.c 8.1 (Berkeley) 6/6/93";*/
|
||||||
static char *rcsid = "$Id: kvm_mkdb.c,v 1.7 1994/06/11 07:57:40 mycroft Exp $";
|
static char *rcsid = "$Id: kvm_mkdb.c,v 1.8 1994/08/29 23:17:00 mycroft Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
@ -58,6 +58,15 @@ static char *rcsid = "$Id: kvm_mkdb.c,v 1.7 1994/06/11 07:57:40 mycroft Exp $";
|
||||||
|
|
||||||
static void usage __P((void));
|
static void usage __P((void));
|
||||||
|
|
||||||
|
HASHINFO openinfo = {
|
||||||
|
4096, /* bsize */
|
||||||
|
128, /* ffactor */
|
||||||
|
1024, /* nelem */
|
||||||
|
2048 * 1024, /* cachesize */
|
||||||
|
NULL, /* hash() */
|
||||||
|
0 /* lorder */
|
||||||
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
main(argc, argv)
|
main(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
|
@ -93,7 +102,7 @@ main(argc, argv)
|
||||||
_PATH_VARDB, nlistname);
|
_PATH_VARDB, nlistname);
|
||||||
(void)umask(0);
|
(void)umask(0);
|
||||||
db = dbopen(dbtemp, O_CREAT | O_EXLOCK | O_TRUNC | O_RDWR,
|
db = dbopen(dbtemp, O_CREAT | O_EXLOCK | O_TRUNC | O_RDWR,
|
||||||
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, DB_HASH, NULL);
|
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, DB_HASH, &openinfo);
|
||||||
if (db == NULL)
|
if (db == NULL)
|
||||||
err(1, "%s", dbtemp);
|
err(1, "%s", dbtemp);
|
||||||
create_knlist(nlistpath, db);
|
create_knlist(nlistpath, db);
|
||||||
|
|
Loading…
Reference in New Issue