Subject: dev_mkdb
To: None <>
From: maximum entropy <>
List: current-users
Date: 07/09/2001 18:26:48
dev_mkdb is generating device pathnames like "/dev//ttyp1" in
/var/run/dev.db.  This is causing screwy output from programs like
"w" and "ttyname".

I'm not sure why I suddenly started seeing this, but I'm guessing it's
either due to the recent dev_mkdb changes, or due to my recent updates
of /etc/rc.d/*.  If I just rm /var/run/dev.db and log in again, the
fallback code in ttyname(3) generates the correct names and everything
looks normal again.

Looking through the dev_mkdb code, I see that it's passing in "/dev/"
to the fts*() routines, and the results are coming back with the
doubled slash ("/dev//ttyp1").

I can easily fix dev_mkdb to strip off any trailing slashes from
_PATH_DEV before passing it into fts*().  But I'm thinking it might be
better to fix fts*() to do this itself.

What's the right thing to do?

entropy -- it's not just a good idea, it's the second law.