Module Name: src
Committed By: dholland
Date: Sat Dec 25 20:34:08 UTC 2010
Modified Files:
src/usr.bin/make: main.c
Log Message:
Improve confusing error message when getcwd() fails.
To generate a diff of this commit:
cvs rdiff -u -r1.193 -r1.194 src/usr.bin/make/main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.193 src/usr.bin/make/main.c:1.194
--- src/usr.bin/make/main.c:1.193 Sat Dec 25 04:57:07 2010
+++ src/usr.bin/make/main.c Sat Dec 25 20:34:08 2010
@@ -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 <sys/cdefs.h>
#ifndef lint
@@ -81,7 +81,7 @@
#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 @@
* 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);
}