]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-openafs-bozo-varargs-20071031
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Wed, 31 Oct 2007 04:21:14 +0000 (04:21 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 31 Oct 2007 04:21:14 +0000 (04:21 +0000)
convert bozo to be prototypable

(cherry picked from commit 3f449eb48eb0f4069062401a6a27f7481c0e88d3)

src/bozo/bnode.c
src/bozo/bosoprocs.c
src/bozo/bosprototypes.h [new file with mode: 0644]
src/bozo/bosserver.c
src/bozo/cronbnodeops.c
src/bozo/ezbnodeops.c
src/bozo/fsbnodeops.c

index f6facc31a1b27647e6d2e62ccca1edf94e6dff91..da8f4d1c1aee2cea77a30a43eb7b586481d40ffa 100644 (file)
@@ -36,6 +36,7 @@ RCSID
 #include <afs/afsutil.h>
 #include <afs/fileutil.h>
 #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 */
index a9b1b294d854dd2053729e2dbf42c6541b95f5cd..98eaa78ba405e7016b735d8a9828789ef5d30d9e 100644 (file)
@@ -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 (file)
index 0000000..590bedd
--- /dev/null
@@ -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
index ca2f4a64fd0bbc6093bfbdae356678260f703acc..6593f880c011e2e8e7001dc8c6918563e2901b8e 100644 (file)
@@ -21,6 +21,7 @@ RCSID
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdarg.h>
 #ifdef AFS_NT40_ENV
 #include <winsock2.h>
 #include <direct.h>
@@ -37,6 +38,7 @@ RCSID
 #include <rx/rx_globals.h>
 #include "bosint.h"
 #include "bnode.h"
+#include "bosprototypes.h"
 #include <rx/rxkad.h>
 #include <afs/keys.h>
 #include <afs/ktime.h>
@@ -47,14 +49,11 @@ RCSID
 #include <afs/afs_args.h>
 #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);
index 6657cd2f52892752e81ec712b238c5e7f1fa9282..6c80b71843ee85d602b940994ad40bf3abc80668 100644 (file)
@@ -30,6 +30,7 @@ RCSID
 #include <afs/afsutil.h>
 #include <afs/procmgmt.h>      /* 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();
index b55ab1e7b74da4d26ed9afa202585093b1514280..681e59a71b2a38d5b8825d05e30eb57ca853e3c9 100644 (file)
@@ -27,6 +27,7 @@ RCSID
 #include <afs/afsutil.h>
 #include <afs/procmgmt.h>      /* 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();
index f06eb3917b262d029492bfffce1afe724d39f62d..07ddef200af6afabc3d217b4e80525aa75c31233 100644 (file)
@@ -34,7 +34,7 @@ RCSID
 #include <afs/procmgmt.h>      /* signal(), kill(), wait(), etc. */
 #include <afs/afsutil.h>
 #include "bnode.h"
-
+#include "bosprototypes.h"
 
 static int emergency = 0;