Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Feb 2004 17:49:45 +0100 (CET)
From:      Lukas Ertl <l.ertl@univie.ac.at>
To:        current@freebsd.org
Subject:   DEVFS oddity
Message-ID:  <20040213173919.F662@korben.in.tern>

next in thread | raw e-mail | index | archive | help
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@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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040213173919.F662>