Commit Graph

20 Commits

Author SHA1 Message Date
agc 326b2259b7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-08-07 11:25:11 +00:00
itojun d0512514bd use strlcpy. don't hardcode sizes, use sizeof. 2003-05-17 19:09:08 +00:00
hannken 487a4fb83a Set explicit database layout. Default is filesystem block size
and hashdb doesn't work for bucket size >= 65536.
Approved by: Jason R. Thorpe <thorpej@netbsd.org>
2002-12-15 18:23:00 +00:00
manu ba6302b854 Removed two debug messages commited by mistake. Sorry about this. 2001-07-15 17:27:32 +00:00
manu 3ac4f70df5 errno is not tested any more if dbopen succeeds (to quote errno(2), "It
should only be examined after an error")
Added an additionnal chdir so that -o works with a file in the current
directory.
2001-07-14 14:50:44 +00:00
manu 2e20a48c80 Moved the errno=0 in the loop for opening the temp file. The problem was that
successful syscalls never set errno, and hence we could have had an inifinite
loop if the opening failed once and succeded on second attempt.
2001-07-13 15:54:22 +00:00
manu 7e7825ce44 FIxed a problem with string length (a leading / was appearing in w, who and others)
We were using rename() to create the target file from the temp file. Now the temp file is created in the same directory of the targer file so that rename() will always work (it needs to have the files in the same filesystem)
Using the -o file, the output file may be on a world writable directory, we hence open the temporary file using O_EXCL, and we loop trying different names until it works.
2001-07-12 20:46:39 +00:00
manu 896577bca5 We use rename() to produce the dev.db file, and rename() is not able to move
files across filesystems. Hence we use /var/run for dev.tmp, since dev.db
will be in /var/run.
2001-07-08 20:01:43 +00:00
manu b971cc2b24 - Moved the temp file to /tmp instead of /var/tmp
- Added a O_EXCL flag so that we cannot open an existing file for temp file
2001-07-05 20:35:33 +00:00
manu b70b2499b0 Added flags to choose the location of the input device directory and the
output device database. Goal is to be consistent with other *_mkdb
utilities such as pwd_mkdb or kvm_mkdb.
2001-07-04 20:42:02 +00:00
enami fdb519152d Descent into subdirs so that pstat -v prints files on fdescfs symbolically. 2001-04-10 06:11:27 +00:00
enami 68109f4f6e - Cosmetic changes like:
* Put space after keyword `switch'.
	* Explicitly dereference pointer to function.
- Remove unnecessary cast.
2001-04-10 06:08:12 +00:00
lukem 7e44e0ebc2 deprecate register, use memset/memmove instead of bzero/bcopy 1997-10-18 08:18:00 +00:00
lukem 0a469c567a WARNSify, getopt returns -1 not EOF 1997-10-17 00:12:49 +00:00
mikel 54d63208ce RCSid police 1997-03-08 06:48:00 +00:00
mycroft bbfccb8f00 Merge with 4.4-Lite, and use libc err(3) and warn(3). 1995-01-30 21:12:41 +00:00
mycroft 1b483c4f71 From Mark Weaver:
Use lstat() rather that stat(), to avoid chasing symlinks.
1993-10-22 10:38:33 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
proven 62566787d2 Changed hash_open to dbopen. 1993-04-21 08:26:54 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00