Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Apr 2002 20:44:35 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
Cc:        freebsd-current@freebsd.org, <phk@freebsd.org>
Subject:   Re: disklabel(8) floppy panic
Message-ID:  <20020403202932.T9816-100000@gamplex.bde.org>
In-Reply-To: <20020402203559.A25802@uriah.heep.sax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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