DEVFS oddity
Lukas Ertl
l.ertl at univie.ac.at
Fri Feb 13 08:49:57 PST 2004
Hi,
I've came across an oddity in devfs. The size of a symlink is the length
of the "symbolic name", not the one of the target.
Consider:
$ ls -la /dev/ | grep ^l
lrwxr-xr-x 1 root wheel 3 13 Feb 16:01 dvd@ -> acd0
lrwxr-xr-x 1 root wheel 4 13 Feb 17:01 kbd0@ -> atkbd0
lrwxr-xr-x 1 root wheel 3 13 Feb 16:01 log@ -> /var/run/log
lrwxr-xr-x 1 root wheel 4 13 Feb 17:01 net1@ -> net/fxp0
lrwxr-xr-x 1 root wheel 4 13 Feb 17:01 net2@ -> net/lo0
lrwxr-xr-x 1 root wheel 4 13 Feb 16:02 net3@ -> net/ndis0
lrwxr-xr-x 1 root wheel 6 13 Feb 17:01 stderr@ -> fd/2
lrwxr-xr-x 1 root wheel 5 13 Feb 17:01 stdin@ -> fd/0
lrwxr-xr-x 1 root wheel 6 13 Feb 17:01 stdout@ -> fd/1
lrwxr-xr-x 1 root wheel 7 13 Feb 17:01 urandom@ -> random
against:
$ ls -l /sys
lrwxr-xr-x 1 root wheel 11 13 Feb 12:12 /sys@ -> usr/src/sys
Is this considered a bug or a feature? :-)
regards,
le
--
Lukas Ertl eMail: l.ertl at univie.ac.at
UNIX Systemadministrator Tel.: (+43 1) 4277-14073
Vienna University Computer Center Fax.: (+43 1) 4277-9140
University of Vienna http://mailbox.univie.ac.at/~le/
More information about the freebsd-current
mailing list