diff options
| author | joerg <joerg@NetBSD.org> | 2012-06-03 21:42:44 +0000 |
|---|---|---|
| committer | joerg <joerg@NetBSD.org> | 2012-06-03 21:42:44 +0000 |
| commit | c75c4faf072ea40511548482ef5ddf59c92afcc0 (patch) | |
| tree | b2176172ab0730406ac514ab1c56e5cbd2720253 /include | |
| parent | b77be5886d2a20db14467957a1d6086db60cec6e (diff) | |
Switch device database to cdb(5). Rework ttyname(3) and ttyname_r(3) to
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.
Diffstat (limited to 'include')
| -rw-r--r-- | include/paths.h | 3 | ||||
| -rw-r--r-- | include/stdlib.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/paths.h b/include/paths.h index 55dcb7eb83d..82f2ae53222 100644 --- a/include/paths.h +++ b/include/paths.h @@ -1,4 +1,4 @@ -/* $NetBSD: paths.h,v 1.40 2011/09/27 11:24:20 jruoho Exp $ */ +/* $NetBSD: paths.h,v 1.41 2012/06/03 21:42:46 joerg Exp $ */ /* * Copyright (c) 1989, 1993 @@ -64,6 +64,7 @@ #define _PATH_CPUCTL "/dev/cpuctl" #define _PATH_CSMAPPER "/usr/share/i18n/csmapper" #define _PATH_DEFTAPE "/dev/nrst0" +#define _PATH_DEVCDB "/var/run/dev.cdb" #define _PATH_DEVDB "/var/run/dev.db" #define _PATH_DEVNULL "/dev/null" #define _PATH_DRUM "/dev/drum" diff --git a/include/stdlib.h b/include/stdlib.h index 6bcddbf93bb..9def010b44f 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -1,4 +1,4 @@ -/* $NetBSD: stdlib.h,v 1.98 2012/04/20 17:31:29 christos Exp $ */ +/* $NetBSD: stdlib.h,v 1.99 2012/06/03 21:42:46 joerg Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -269,6 +269,7 @@ int cgetustr(char *, const char *, char **); void csetexpandtc(int); int daemon(int, int); +int devname_r(dev_t, mode_t, char *, size_t); #ifndef __LIBC12_SOURCE__ __aconst char *devname(dev_t, mode_t) __RENAME(__devname50); #endif |
