On Sun, 17 May 2009 09:13:30 +0200
Robert Luberda <rob...@debian.org> wrote:

> > >     % ls -l /dev/vbidefault
> > >     lrwxrwxrwx 1 root video 8 May 15 20:02 /dev/vbidefault
> > > -> /dev/vb1
> 
> Oh, shouldn't the link point to /dev/vbi1? I don't think /dev/vb1
> exists on your system.

Checking:

        % ls -l /dev/vb*
        crw-rw----+ 1 root video 81, 224 May 19 10:45 /dev/vbi0
        crw-rw----+ 1 root video 81, 225 May 19 10:45 /dev/vbi1
        lrwxrwxrwx  1 root video       8 May 19 14:49 /dev/vbidefault -> 
/dev/vb1
        lrwxrwxrwx  1 root video       8 May 19 14:49 /dev/vbisecondary -> 
/dev/vb0
        % ls -l /dev/vb1
        ls: cannot access /dev/vb1: No such file or directory

Well, the cause was a typo in one of my local setup scripts:

        ln -fs /dev/vb$N /dev/vbidefault

(And so I've corrected that script.  Not very often a maintainer fixes my
bug.  Thanks!)

> > >     % readlink -f /dev/vbidefault
> > >     /dev/vb1
> > >
> > >     % realpath /dev/vbidefault ; echo $?
> > >     /dev/vbidefault: No such file or directory
> > >     1
> 
> 
> I've just created some link to non-existent file and reproduced your
> report, but wouldn't however consider it as a bug. It's an expected
> behaviour of realpath, which should fail on missing files.

It should fail, it should... and yet, if the error message
read:

        /dev/vb1: No such file or directory

...it wouldn't have confused me long, I could have tested it with
'ls -l' and might have immediately seen the problem.  Needless to say
symlinks are files, (small files); the symlink '/dev/vbidefault'
did exist, so the current (indirect) error perplexed (me).

> ...Anyway, many thanks for your bug report and finding the difference
> between `readlink -f' and `realpath' I haven't been aware of. I will
> document it in man page in the next version of realpath.

Very glad to "help", and more thanks for explaining how a user mistake
had an OK side effect.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to