Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jul 2001 18:00:02 -0700 (PDT)
From:      Leo Bicknell <bicknell@ufp.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/7265: A warning flag is added to ln(1).
Message-ID:  <200107110100.f6B102k62869@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/7265; it has been noted by GNATS.

From: Leo Bicknell <bicknell@ufp.org>
To: freebsd-gnats-submit@freebsd.org, joelh@gnu.org
Cc:  
Subject: Re: bin/7265: A warning flag is added to ln(1).
Date: Tue, 10 Jul 2001 20:53:08 -0400

 I found this pr quite funny, but it hit me that the real solution is
 not a patch to ln.  It's right there in the how to repeat:
 
 # cd /usr
 # ln -s src/sys /sys
 # cd /sys
 /sys: No such file or directory.
 
 The ln was successful, there were no errors, and warning are, in general,
 bad.  However, there was very much an error on the cd, an error that was
 poorly reported.
 
 "No such file or directory" actually means:
     "Directory does not exist."
     "Symlink points to directory that does not exist."
 
 Note, the file bit is completely misleading, as that's another error:
 
 % touch foo
 % cd foo
 foo: Not a directory.
 
 So, I do believe the right answer is to patch cd (which sadly means
 patching shells) so that it reports errors correctly.  Here's a sample
 of the results with the (non-existant) patch applied:
 
 # cd /usr
 # ln -s src/sys /sys    
 # cd /sys    
 /sys: Symlink points to directory that does not exist.
 
 I think that would stop our friendly sysadmins from pulling their
 hair out, stands no chance of ever breaking ln, and it's hard to
 argue that more precise error reporting is a bad thing.
 
 Who's going to do patches for the 952 shells out there? :-)
 
 -- 
 Leo Bicknell - bicknell@ufp.org
 Systems Engineer - Internetworking Engineer - CCIE 3440
 Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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