* Copyright (c) 1989 The Regents of the University of California.
* %sccs.include.redist.c%
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid
[] = "@(#)devname.c 5.15 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
!(db
= dbopen(_PATH_DEVDB
, O_RDONLY
, 0, DB_HASH
, NULL
))) {
"warning: %s: %s\n", _PATH_DEVDB
, strerror(errno
));
* Keys are a mode_t followed by a dev_t. The former is the type of
* the file (mode & S_IFMT), the latter is the st_rdev field.
return((db
->get
)(db
, &key
, &data
, 0L) ? "??" : (char *)data
.data
);