summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/cvs/cvs.c9
-rw-r--r--usr.bin/cvs/diff.c5
-rw-r--r--usr.bin/cvs/includes.h3
-rw-r--r--usr.bin/cvs/log.c7
-rw-r--r--usr.bin/cvs/log.h4
5 files changed, 12 insertions, 16 deletions
diff --git a/usr.bin/cvs/cvs.c b/usr.bin/cvs/cvs.c
index 50c0f38196a..d0064072b12 100644
--- a/usr.bin/cvs/cvs.c
+++ b/usr.bin/cvs/cvs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cvs.c,v 1.90 2006/01/02 08:11:56 xsa Exp $ */
+/* $OpenBSD: cvs.c,v 1.91 2006/01/02 17:06:10 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -94,8 +94,7 @@ main(int argc, char **argv)
TAILQ_INIT(&cvs_variables);
- if (cvs_log_init(LD_STD, 0) < 0)
- err(1, "failed to initialize logging");
+ cvs_log_init(LD_STD, 0);
/* by default, be very verbose */
(void)cvs_log_filter(LP_FILTER_UNSET, LP_INFO);
@@ -321,9 +320,9 @@ cvs_getopt(int argc, char **argv)
case 'z':
cvs_compress = (int)strtol(optarg, &ep, 10);
if (*ep != '\0')
- errx(1, "error parsing compression level");
+ fatal("error parsing compression level");
if (cvs_compress < 0 || cvs_compress > 9)
- errx(1, "gzip compression level must be "
+ fatal("gzip compression level must be "
"between 0 and 9");
break;
default:
diff --git a/usr.bin/cvs/diff.c b/usr.bin/cvs/diff.c
index 8c55310f14a..c0bc3d323ad 100644
--- a/usr.bin/cvs/diff.c
+++ b/usr.bin/cvs/diff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff.c,v 1.75 2006/01/02 08:11:56 xsa Exp $ */
+/* $OpenBSD: diff.c,v 1.76 2006/01/02 17:06:10 xsa Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
* All rights reserved.
@@ -1425,7 +1425,8 @@ fetch(long *f, int a, int b, FILE *lb, int ch, int oldfile)
for (j = 0, lastc = '\0'; j < nc; j++, lastc = c) {
if ((c = getc(lb)) == EOF) {
if (diff_format == D_RCSDIFF)
- warnx("No newline at end of file");
+ cvs_log(LP_WARN,
+ "No newline at end of file");
else
diff_output("\n\\ No newline at end of "
"file");
diff --git a/usr.bin/cvs/includes.h b/usr.bin/cvs/includes.h
index 26c1dcdf688..be972db6ce7 100644
--- a/usr.bin/cvs/includes.h
+++ b/usr.bin/cvs/includes.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: includes.h,v 1.1 2006/01/02 08:11:56 xsa Exp $ */
+/* $OpenBSD: includes.h,v 1.2 2006/01/02 17:06:10 xsa Exp $ */
/*
* Copyright (c) 2005 Xavier Santolaria <xsa@openbsd.org>
* All rights reserved.
@@ -37,7 +37,6 @@
#include <ctype.h>
#include <dirent.h>
-#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <fnmatch.h>
diff --git a/usr.bin/cvs/log.c b/usr.bin/cvs/log.c
index 0bbae06108a..36bad62bf95 100644
--- a/usr.bin/cvs/log.c
+++ b/usr.bin/cvs/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.29 2006/01/02 08:11:56 xsa Exp $ */
+/* $OpenBSD: log.c,v 1.30 2006/01/02 17:06:10 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -79,9 +79,8 @@ static u_int cvs_log_filters;
* cvs_log_init()
*
* Initialize the logging facility of the server.
- * Returns 0 on success, or -1 on failure.
*/
-int
+void
cvs_log_init(u_int dest, u_int flags)
{
int slopt;
@@ -107,8 +106,6 @@ cvs_log_init(u_int dest, u_int flags)
openlog_r(__progname, slopt, LOG_DAEMON, &cvs_sl);
}
-
- return (0);
}
diff --git a/usr.bin/cvs/log.h b/usr.bin/cvs/log.h
index 8a31755c4ec..5bf5a4f7f22 100644
--- a/usr.bin/cvs/log.h
+++ b/usr.bin/cvs/log.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.h,v 1.14 2006/01/02 08:11:56 xsa Exp $ */
+/* $OpenBSD: log.h,v 1.15 2006/01/02 17:06:10 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -56,7 +56,7 @@
#define LP_FILTER_SET 0 /* set a filter */
#define LP_FILTER_UNSET 1 /* remove a filter */
-int cvs_log_init(u_int, u_int);
+void cvs_log_init(u_int, u_int);
void cvs_log_cleanup(void);
int cvs_log_filter(u_int, u_int);
int cvs_log(u_int, const char *, ...);