summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/cvs.c
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2004-12-14 19:56:36 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2004-12-14 19:56:36 +0000
commitbe7c3c4eea2b56cf0ae4b7fb64615f703b784c6d (patch)
treeacc2163919c9396a4e66db1efe8f7b9dbea503e5 /usr.bin/cvs/cvs.c
parenta131eef0c661520db7090994d5b43e7d23ef3747 (diff)
be more verbose for .cvsrc errors/warnings; ok jfb@.
Diffstat (limited to 'usr.bin/cvs/cvs.c')
-rw-r--r--usr.bin/cvs/cvs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/cvs/cvs.c b/usr.bin/cvs/cvs.c
index 57ea74d7c58..aecdc03ca0e 100644
--- a/usr.bin/cvs/cvs.c
+++ b/usr.bin/cvs/cvs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cvs.c,v 1.22 2004/12/14 19:11:54 jfb Exp $ */
+/* $OpenBSD: cvs.c,v 1.23 2004/12/14 19:56:35 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -550,6 +550,7 @@ void
cvs_read_rcfile(void)
{
char rcpath[MAXPATHLEN], linebuf[128], *lp;
+ int linenum = 0;
size_t len;
struct cvs_cmd *cmdp;
struct passwd *pw;
@@ -572,10 +573,12 @@ cvs_read_rcfile(void)
}
while (fgets(linebuf, sizeof(linebuf), fp) != NULL) {
+ linenum++;
if ((len = strlen(linebuf)) == 0)
continue;
if (linebuf[len - 1] != '\n') {
- cvs_log(LP_WARN, ".cvsrc line too long");
+ cvs_log(LP_WARN, "line too long in `%s:%d'", rcpath,
+ linenum);
break;
}
linebuf[--len] = '\0';
@@ -614,7 +617,7 @@ cvs_read_rcfile(void)
}
}
if (ferror(fp)) {
- cvs_log(LP_NOTICE, "failed to read line from cvsrc");
+ cvs_log(LP_NOTICE, "failed to read line from `%s'", rcpath);
}
(void)fclose(fp);