summaryrefslogtreecommitdiff
path: root/usr.sbin/dev_mkdb/dev_mkdb.c
AgeCommit message (Collapse)Author
2012-06-03Switch device database to cdb(5). Rework ttyname(3) and ttyname_r(3) tojoerg
depend on new devname_r(3) as heart. Add /dev/pts magic directly to devname(3). While it can lead to returning non-existing paths, the behavior is more consistent that way. Drop caching layer in devname(3), it doesn't buy anything for the common case of having access to the database. Teach devname(3) proper fallback behavior of scanning /dev. Create both old-style and new-style database for now in /etc/rc.d/sysdb.
2011-08-30static openinfo. dead, not unused usage.joerg
2009-04-15Fix -Wsign-compare issuelukem
2008-12-28fix suseconds_t format.christos
2008-07-21Remove the \n and tabs from the __COPYRIGHT() strings.lukem
Tweak to use a consistent format.
2007-12-15convert __attribute__s to applicable cdefs.h macrosperry
2005-11-18The latest fts fix that removes double-slashes from paths exposed a bugchristos
in the code. Don't assume that the extra slash is going to be there.
2005-10-24Don't assume that fts(3) will add a slash to the name. From Steve Woodford.christos
KNF.
2005-03-16Kill __P(), use ANSI function declarations; WARNS=3xtraeme
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-05-17use strlcpy. don't hardcode sizes, use sizeof.itojun
2002-12-15Set explicit database layout. Default is filesystem block sizehannken
and hashdb doesn't work for bucket size >= 65536. Approved by: Jason R. Thorpe <thorpej@netbsd.org>
2001-07-15Removed two debug messages commited by mistake. Sorry about this.manu
2001-07-14errno is not tested any more if dbopen succeeds (to quote errno(2), "Itmanu
should only be examined after an error") Added an additionnal chdir so that -o works with a file in the current directory.
2001-07-13Moved the errno=0 in the loop for opening the temp file. The problem was thatmanu
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-12FIxed a problem with string length (a leading / was appearing in w, who and ↵manu
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-08We use rename() to produce the dev.db file, and rename() is not able to movemanu
files across filesystems. Hence we use /var/run for dev.tmp, since dev.db will be in /var/run.
2001-07-05- Moved the temp file to /tmp instead of /var/tmpmanu
- Added a O_EXCL flag so that we cannot open an existing file for temp file
2001-07-04Added flags to choose the location of the input device directory and themanu
output device database. Goal is to be consistent with other *_mkdb utilities such as pwd_mkdb or kvm_mkdb.
2001-04-10Descent into subdirs so that pstat -v prints files on fdescfs symbolically.enami
2001-04-10- Cosmetic changes like:enami
* Put space after keyword `switch'. * Explicitly dereference pointer to function. - Remove unnecessary cast.
1997-10-18deprecate register, use memset/memmove instead of bzero/bcopylukem
1997-10-17WARNSify, getopt returns -1 not EOFlukem
1997-03-08RCSid policemikel
1995-01-30Merge with 4.4-Lite, and use libc err(3) and warn(3).mycroft
1993-10-22From Mark Weaver:mycroft
Use lstat() rather that stat(), to avoid chasing symlinks.
1993-08-01Add RCS identifiers.mycroft
1993-04-21Changed hash_open to dbopen.proven
1993-03-21initial import of 386bsd-0.1 sourcescgd