From 305d1514467ae21c6b535e5042f7cbd8d835892e Mon Sep 17 00:00:00 2001 From: dholland Date: Sat, 25 Dec 2010 20:34:08 +0000 Subject: [PATCH] Improve confusing error message when getcwd() fails. --- usr.bin/make/main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index 15f99813ab72..5abc5781cf0e 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.193 2010/12/25 04:57:07 dholland Exp $ */ +/* $NetBSD: main.c,v 1.194 2010/12/25 20:34:08 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.193 2010/12/25 04:57:07 dholland Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.194 2010/12/25 20:34:08 dholland Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\ #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.193 2010/12/25 04:57:07 dholland Exp $"); +__RCSID("$NetBSD: main.c,v 1.194 2010/12/25 20:34:08 dholland Exp $"); #endif #endif /* not lint */ #endif @@ -964,7 +964,8 @@ main(int argc, char **argv) * We take care of PWD for the automounter below... */ if (getcwd(curdir, MAXPATHLEN) == NULL) { - (void)fprintf(stderr, "%s: %s.\n", progname, strerror(errno)); + (void)fprintf(stderr, "%s: getcwd: %s.\n", + progname, strerror(errno)); exit(2); }