DEVFS oddity

From: Lukas Ertl <l.ertl_at_univie.ac.at>
Date: Fri, 13 Feb 2004 17:49:45 +0100 (CET)
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_at_ -> acd0
lrwxr-xr-x   1 root  wheel    4 13 Feb 17:01 kbd0_at_ -> atkbd0
lrwxr-xr-x   1 root  wheel    3 13 Feb 16:01 log_at_ -> /var/run/log
lrwxr-xr-x   1 root  wheel    4 13 Feb 17:01 net1_at_ -> net/fxp0
lrwxr-xr-x   1 root  wheel    4 13 Feb 17:01 net2_at_ -> net/lo0
lrwxr-xr-x   1 root  wheel    4 13 Feb 16:02 net3_at_ -> net/ndis0
lrwxr-xr-x   1 root  wheel    6 13 Feb 17:01 stderr_at_ -> fd/2
lrwxr-xr-x   1 root  wheel    5 13 Feb 17:01 stdin_at_ -> fd/0
lrwxr-xr-x   1 root  wheel    6 13 Feb 17:01 stdout_at_ -> fd/1
lrwxr-xr-x   1 root  wheel    7 13 Feb 17:01 urandom_at_ -> random

against:

$ ls -l /sys
lrwxr-xr-x  1 root  wheel  11 13 Feb 12:12 /sys_at_ -> 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/
Received on Fri Feb 13 2004 - 07:49:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:43 UTC