summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-01-16 01:12:36 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-01-16 01:12:36 +0000
commit1593fe3fbd08472eea722d9e1fc0264718d44553 (patch)
tree1caf3d8fa27ae11e2b4fb6ec55e59fb79bce94dd /usr.bin
parentfd75b5ca438d5587a4224b591d11ee9563a5159d (diff)
log -> logit ISO C fix.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/oldrdist/defs.h4
-rw-r--r--usr.bin/oldrdist/docmd.c10
-rw-r--r--usr.bin/oldrdist/server.c34
3 files changed, 24 insertions, 24 deletions
diff --git a/usr.bin/oldrdist/defs.h b/usr.bin/oldrdist/defs.h
index 72f4d9437ed..e43c060f468 100644
--- a/usr.bin/oldrdist/defs.h
+++ b/usr.bin/oldrdist/defs.h
@@ -1,4 +1,4 @@
-/* * $OpenBSD: defs.h,v 1.11 2003/06/03 02:56:14 millert Exp $*/
+/* * $OpenBSD: defs.h,v 1.12 2004/01/16 01:12:35 espie Exp $*/
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
@@ -164,7 +164,7 @@ void fatal(const char *, ...);
int inlist(struct namelist *, char *);
void insert(char *, struct namelist *, struct namelist *, struct subcmd *);
void install(char *, char *, int, int);
-void log(FILE *, const char *, ...);
+void logit(FILE *, const char *, ...);
struct namelist *
lookup(char *, int, struct namelist *);
void lostconn(int);
diff --git a/usr.bin/oldrdist/docmd.c b/usr.bin/oldrdist/docmd.c
index a11dfd48129..a6c8354cc74 100644
--- a/usr.bin/oldrdist/docmd.c
+++ b/usr.bin/oldrdist/docmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: docmd.c,v 1.18 2003/06/03 02:56:14 millert Exp $ */
+/* $OpenBSD: docmd.c,v 1.19 2004/01/16 01:12:35 espie Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -31,7 +31,7 @@
#ifndef lint
/* from: static char sccsid[] = "@(#)docmd.c 8.1 (Berkeley) 6/9/93"; */
-static char *rcsid = "$OpenBSD: docmd.c,v 1.18 2003/06/03 02:56:14 millert Exp $";
+static char *rcsid = "$OpenBSD: docmd.c,v 1.19 2004/01/16 01:12:35 espie Exp $";
#endif /* not lint */
#include "defs.h"
@@ -193,7 +193,7 @@ done:
nextihead = ihead->nextp;
if ((opts & IGNLNKS) || ihead->count == 0)
continue;
- log(lfp, "%s: Warning: missing links\n",
+ logit(lfp, "%s: Warning: missing links\n",
ihead->pathname);
free(ihead);
}
@@ -328,7 +328,7 @@ lostconn(signo)
{
if (iamremote)
cleanup(0);
- log(lfp, "rdist: lost connection\n");
+ logit(lfp, "rdist: lost connection\n");
if (rem >= 0) {
(void) close(rem);
rem = -1;
@@ -480,7 +480,7 @@ cmptime(name)
}
if (stb.st_mtime > lastmod)
- log(tfp, "new: %s\n", name);
+ logit(tfp, "new: %s\n", name);
}
static void
diff --git a/usr.bin/oldrdist/server.c b/usr.bin/oldrdist/server.c
index 4403851f476..7c870805292 100644
--- a/usr.bin/oldrdist/server.c
+++ b/usr.bin/oldrdist/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.25 2004/01/15 19:12:31 otto Exp $ */
+/* $OpenBSD: server.c,v 1.26 2004/01/16 01:12:35 espie Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -31,7 +31,7 @@
#ifndef lint
/* from: static char sccsid[] = "@(#)server.c 8.1 (Berkeley) 6/9/93"; */
-static char *rcsid = "$OpenBSD: server.c,v 1.25 2004/01/15 19:12:31 otto Exp $";
+static char *rcsid = "$OpenBSD: server.c,v 1.26 2004/01/16 01:12:35 espie Exp $";
#endif /* not lint */
#include <sys/wait.h>
@@ -212,7 +212,7 @@ server()
continue;
case 'L': /* Log. save message in log file */
- log(lfp, "%s", cp);
+ logit(lfp, "%s", cp);
continue;
#endif
@@ -388,14 +388,14 @@ sendf(rname, opts)
if (pw == NULL || pw->pw_uid != stb.st_uid)
if ((pw = getpwuid(stb.st_uid)) == NULL) {
- log(lfp, "%s: no password entry for uid %u \n",
+ logit(lfp, "%s: no password entry for uid %u \n",
target, stb.st_uid);
pw = NULL;
(void) snprintf(user, sizeof(user), ":%u", stb.st_uid);
}
if (gr == NULL || gr->gr_gid != stb.st_gid)
if ((gr = getgrgid(stb.st_gid)) == NULL) {
- log(lfp, "%s: no name for group %u\n",
+ logit(lfp, "%s: no name for group %u\n",
target, stb.st_gid);
gr = NULL;
(void) snprintf(group, sizeof(group), ":%u",
@@ -403,10 +403,10 @@ sendf(rname, opts)
}
if (u == 1) {
if (opts & VERIFY) {
- log(lfp, "need to install: %s\n", target);
+ logit(lfp, "need to install: %s\n", target);
goto dospecial;
}
- log(lfp, "installing: %s\n", target);
+ logit(lfp, "installing: %s\n", target);
opts &= ~(COMPARE|REMOVE);
}
@@ -491,10 +491,10 @@ sendf(rname, opts)
if (u == 2) {
if (opts & VERIFY) {
- log(lfp, "need to update: %s\n", target);
+ logit(lfp, "need to update: %s\n", target);
goto dospecial;
}
- log(lfp, "updating: %s\n", target);
+ logit(lfp, "updating: %s\n", target);
}
if (stb.st_nlink > 1) {
@@ -545,7 +545,7 @@ dospecial:
continue;
if (sc->sc_args != NULL && !inlist(sc->sc_args, target))
continue;
- log(lfp, "special \"%s\"\n", sc->sc_name);
+ logit(lfp, "special \"%s\"\n", sc->sc_name);
if (opts & VERIFY)
continue;
(void) snprintf(buf, sizeof(buf), "SFILE=%s;%s\n", target,
@@ -571,7 +571,7 @@ savelink(stp)
}
lp = (struct linkbuf *) malloc(sizeof(*lp));
if (lp == NULL)
- log(lfp, "out of memory, link information lost\n");
+ logit(lfp, "out of memory, link information lost\n");
else {
lp->nextp = ihead;
ihead = lp;
@@ -642,7 +642,7 @@ again:
case '\3':
*--cp = '\0';
if (lfp != NULL)
- log(lfp, "update: note: %s\n", s);
+ logit(lfp, "update: note: %s\n", s);
goto again;
default:
@@ -678,7 +678,7 @@ again:
if (stp->st_mtime == mtime)
return(0);
if (stp->st_mtime < mtime) {
- log(lfp, "Warning: %s: remote copy is newer\n", target);
+ logit(lfp, "Warning: %s: remote copy is newer\n", target);
return(0);
}
} else if (stp->st_mtime == mtime && stp->st_size == size)
@@ -1184,7 +1184,7 @@ rmchk(opts)
case '\0':
*--cp = '\0';
if (*s != '\0')
- log(lfp, "%s\n", s);
+ logit(lfp, "%s\n", s);
break;
case 'E':
@@ -1436,7 +1436,7 @@ dospecial(cmd)
}
void
-log(FILE *fp, const char *fmt, ...)
+logit(FILE *fp, const char *fmt, ...)
{
va_list ap;
@@ -1529,13 +1529,13 @@ response()
case '\0':
*--cp = '\0';
if (*s != '\0') {
- log(lfp, "%s\n", s);
+ logit(lfp, "%s\n", s);
return(1);
}
return(0);
case '\3':
*--cp = '\0';
- log(lfp, "Note: %s\n",s);
+ logit(lfp, "Note: %s\n",s);
return(response());
default: