]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-openafs-bozo-varargs-20071031
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Wed, 31 Oct 2007 04:21:31 +0000 (04:21 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 31 Oct 2007 04:21:31 +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 bf94658e914dc002490d23e67072e85980c1f5d1..83e9dc66cccf97a983d5cb21853f5b3518ac386e 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 <afs/auth.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, ezbnode_ops, cronbnode_ops;
 
-void bozo_Log();
-
 struct afsconf_dir *bozo_confdir = 0;  /* bozo configuration dir */
 static char *bozo_pid;
 struct rx_securityClass *bozo_rxsc[3];
@@ -1073,14 +1072,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[26];
     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);
@@ -1098,13 +1100,13 @@ bozo_Log(char *a, char *b, char *c, char *d, char *e, char *f)
 
        if (bozo_logFile) {
            fprintf(bozo_logFile, "%s ", tdate);
-           fprintf(bozo_logFile, a, b, c, d, e, f);
+           vfprintf(bozo_logFile, format, ap);
            fflush(bozo_logFile);
            /* close so rm BosLog works */
            fclose(bozo_logFile);
        } else {
            printf("%s ", tdate);
-           printf(a, b, c, d, e, f);
+           vprintf(format, ap);
        }
     }
 }
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 e688b4d8cde73cf2bd5960c18e353d1de492f4b9..cb59e1113fe86f8a46b2399c5f1639cf217ecf9f 100644 (file)
@@ -34,6 +34,7 @@ RCSID
 #include <afs/procmgmt.h>      /* signal(), kill(), wait(), etc. */
 #include <afs/afsutil.h>
 #include "bnode.h"
+#include "bosprototypes.h"
 
 static int fs_timeout(), fs_getstat(), fs_setstat(), fs_delete();
 static int fs_procexit(), fs_getstring(), fs_getparm(), fs_restartp();