On Tue, 2 Apr 2002, Joerg Wunsch wrote:

> As Bruce Evans wrote:
>
> > BTW, device cloning seems to work wrong for fd:
> >
> > %%%
> > Script started on Wed Apr  3 02:16:43 2002
> > ttyp1:bde@besplex:/tmp> ls /dev/fd0c
> > ls: /dev/fd0c: No such file or directory
> > ttyp1:bde@besplex:/tmp> ls /dev/fd0c
> > /dev/fd0c@
> > ttyp1:bde@besplex:/tmp> exit
>
> I can also see this.  IMHO, that's an artifact of how device on-demand
> alias creation is working.  Cc to Poul-Henning, maybe he can shed some
> light on this.
>
> Ah, hmm, i think that's a problem of "ls -F", actually.  Look here.
>
> j@uriah 90% ls -l /dev/fd1*
> crw-r-----  1 root  operator    9,  64 Apr  1 22:37 /dev/fd1
> j@uriah 91% /bin/ls /dev/fd1c
> /dev/fd1c
> j@uriah 92% ls -l /dev/fd1*
> crw-r-----  1 root  operator    9,  64 Apr  1 22:37 /dev/fd1
> lrwxr-xr-x  1 root  wheel            4 Apr  2 20:34 /dev/fd1c@ -> fd0
>
> Plain /bin/ls (without any options) works as expected.

You are right that I forgot to use plain ls.  I have ls aliased to "ls -Fg"
(the "g" tells how long it is since I changed this :-).  I also tried a
stat utility.  It failed like ls.  I just tried cat.  It failed in the
same way.

Plain ls works accidentally by first doing a stat() which fails except for
creating a directory entry; ls then does a successful lstat().

This seems to be a bug in the fd driver.  ls -F "works" the first time
on nonexistent partitions.  But it should only work on devices that
exist.  fd0a and fd0c may need to exist for compatibility, but shouldn't.
fd0b and fd0[d-h] just shouldn't exist.

Bruce


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to