From: Simon Wilkinson Date: Wed, 31 Oct 2007 04:20:33 +0000 (+0000) Subject: openafs-bozo-varargs-20071031 X-Git-Tag: BP-openafs-windows-kdfs-ifs~403 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=3f449eb48eb0f4069062401a6a27f7481c0e88d3 openafs-bozo-varargs-20071031 convert bozo to be prototypable --- diff --git a/src/bozo/bnode.c b/src/bozo/bnode.c index f6facc3..da8f4d1 100644 --- a/src/bozo/bnode.c +++ b/src/bozo/bnode.c @@ -36,6 +36,7 @@ RCSID #include #include #include "bnode.h" +#include "bosprototypes.h" #if defined(AFS_AIX_ENV) || defined(AFS_SUN4_ENV) /* All known versions of AIX lack WCOREDUMP but this works */ diff --git a/src/bozo/bosoprocs.c b/src/bozo/bosoprocs.c index a9b1b29..98eaa78 100644 --- a/src/bozo/bosoprocs.c +++ b/src/bozo/bosoprocs.c @@ -41,7 +41,7 @@ RCSID #include "bnode.h" #include "bosint.h" - +#include "bosprototypes.h" extern struct ktime bozo_nextRestartKT, bozo_nextDayKT; diff --git a/src/bozo/bosprototypes.h b/src/bozo/bosprototypes.h new file mode 100644 index 0000000..590bedd --- /dev/null +++ b/src/bozo/bosprototypes.h @@ -0,0 +1,16 @@ +/* + * Copyright 2000, International Business Machines Corporation and others. + * All Rights Reserved. + * + * This software has been released under the terms of the IBM Public + * License. For details, see the LICENSE file in the top-level source + * directory or online at http://www.openafs.org/dl/license10.html + */ + +#ifndef _BOSPROTOTYPES_H_ +#define _BOSPROTOTYPES_H_ + +/* bosserver.c */ +void bozo_Log(char *format, ... ); + +#endif diff --git a/src/bozo/bosserver.c b/src/bozo/bosserver.c index ca2f4a6..6593f88 100644 --- a/src/bozo/bosserver.c +++ b/src/bozo/bosserver.c @@ -21,6 +21,7 @@ RCSID #include #include #include +#include #ifdef AFS_NT40_ENV #include #include @@ -37,6 +38,7 @@ RCSID #include #include "bosint.h" #include "bnode.h" +#include "bosprototypes.h" #include #include #include @@ -47,14 +49,11 @@ RCSID #include #endif - #define BOZO_LWP_STACKSIZE 16000 extern int BOZO_ExecuteRequest(); extern int RXSTATS_ExecuteRequest(); extern struct bnode_ops fsbnode_ops, dafsbnode_ops, ezbnode_ops, cronbnode_ops; -void bozo_Log(); - struct afsconf_dir *bozo_confdir = 0; /* bozo configuration dir */ static PROCESS bozo_pid; struct rx_securityClass *bozo_rxsc[3]; @@ -1072,14 +1071,17 @@ main(int argc, char **argv, char **envp) } void -bozo_Log(char *a, char *b, char *c, char *d, char *e, char *f) +bozo_Log(char *format, ...) { char tdate[27]; time_t myTime; + va_list ap; + + va_start(ap, format); if (DoSyslog) { #ifndef AFS_NT40_ENV - syslog(LOG_INFO, a, b, c, d, e, f); + vsyslog(LOG_INFO, format, ap); #endif } else { myTime = time(0); @@ -1093,11 +1095,11 @@ bozo_Log(char *a, char *b, char *c, char *d, char *e, char *f) printf("bosserver: WARNING: problem with %s\n", AFSDIR_SERVER_BOZLOG_FILEPATH); printf("%s ", tdate); - printf(a, b, c, d, e, f); + vprintf(format, ap); fflush(stdout); } else { fprintf(bozo_logFile, "%s ", tdate); - fprintf(bozo_logFile, a, b, c, d, e, f); + vfprintf(bozo_logFile, format, ap); /* close so rm BosLog works */ fclose(bozo_logFile); diff --git a/src/bozo/cronbnodeops.c b/src/bozo/cronbnodeops.c index 6657cd2..6c80b71 100644 --- a/src/bozo/cronbnodeops.c +++ b/src/bozo/cronbnodeops.c @@ -30,6 +30,7 @@ RCSID #include #include /* signal(), kill(), wait(), etc. */ #include "bnode.h" +#include "bosprototypes.h" static int cron_timeout(), cron_getstat(), cron_setstat(), cron_delete(); static int cron_procexit(), cron_getstring(), cron_getparm(), cron_restartp(); diff --git a/src/bozo/ezbnodeops.c b/src/bozo/ezbnodeops.c index b55ab1e..681e59a 100644 --- a/src/bozo/ezbnodeops.c +++ b/src/bozo/ezbnodeops.c @@ -27,6 +27,7 @@ RCSID #include #include /* signal(), kill(), wait(), etc. */ #include "bnode.h" +#include "bosprototypes.h" static int ez_timeout(), ez_getstat(), ez_setstat(), ez_delete(); static int ez_procexit(), ez_getstring(), ez_getparm(), ez_restartp(); diff --git a/src/bozo/fsbnodeops.c b/src/bozo/fsbnodeops.c index f06eb39..07ddef2 100644 --- a/src/bozo/fsbnodeops.c +++ b/src/bozo/fsbnodeops.c @@ -34,7 +34,7 @@ RCSID #include /* signal(), kill(), wait(), etc. */ #include #include "bnode.h" - +#include "bosprototypes.h" static int emergency = 0;