summaryrefslogtreecommitdiffstats
path: root/bin/csh
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-06-18 14:34:48 +0000
committerache <ache@FreeBSD.org>1995-06-18 14:34:48 +0000
commitdac9b56c4ea7975d14daa5276aa3e10df75810de (patch)
treee7d683469f91dd2a8b03751e9450727582355d5e /bin/csh
parent4ceec448202671b9cf3e226f494b9d514e71b1df (diff)
downloadFreeBSD-src-dac9b56c4ea7975d14daa5276aa3e10df75810de.zip
FreeBSD-src-dac9b56c4ea7975d14daa5276aa3e10df75810de.tar.gz
Additionly print strerror(errno), when getwd() fails to start
in initial directory. Obtained from: idea from NetBSD
Diffstat (limited to 'bin/csh')
-rw-r--r--bin/csh/dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/csh/dir.c b/bin/csh/dir.c
index f908a5d..4f8c44f 100644
--- a/bin/csh/dir.c
+++ b/bin/csh/dir.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: dir.c,v 1.2 1994/09/24 02:53:54 davidg Exp $
+ * $Id: dir.c,v 1.3 1995/05/30 00:06:30 rgrimes Exp $
*/
#ifndef lint
@@ -84,7 +84,7 @@ dinit(hp)
/* Don't believe the login shell home, because it may be a symlink */
tcp = getwd(path); /* see ngetwd.c for System V version */
if (tcp == NULL || *tcp == '\0') {
- (void) fprintf(csherr, "csh: %s\n", path);
+ (void) fprintf(csherr, "csh: %s: %s\n", path, strerror(errno));
if (hp && *hp) {
tcp = short2str(hp);
if (chdir(tcp) == -1)
OpenPOWER on IntegriCloud