]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Prototypes for the update directory
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Fri, 10 Jul 2009 23:51:14 +0000 (00:51 +0100)
committerRuss Allbery <rra@stanford.edu>
Sat, 11 Jul 2009 00:30:17 +0000 (18:30 -0600)
Prototyping, ANSIfication, and warning cleanup for the update
directory

Reviewed-on: http://gerrit.openafs.org/52
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
src/update/client.c
src/update/server.c
src/update/update.xg
src/update/update_internal.h [new file with mode: 0644]

index 7ab657f8aade1f8d8f030d45683d770c6e580850..362545a8a3a2d8605bfef21cbec72e0f7529a497 100644 (file)
@@ -52,6 +52,7 @@
 #endif
 #include "update.h"
 #include "global.h"
+#include "update_internal.h"
 
 char *whoami;
 static int verbose;
@@ -62,6 +63,10 @@ static int GetFileFromUpServer(struct rx_connection *conn, char *filename,
                               afs_int32 atime, afs_int32 mtime);
 static int RenameNewFiles(struct filestr *modFiles);
 static int PathsAreEquivalent(char *path1, char *path2);
+int FetchFile(struct rx_call *, char *, char *, int);
+int IsCompatible(char *, afs_int32, afs_int32);
+int NotOnHost(char *, struct filestr *);
+int update_ReceiveFile(int, struct rx_call *, struct stat *);
 
 afs_int32
 GetServer(char *aname)
@@ -80,7 +85,7 @@ GetServer(char *aname)
 
 
 int
-osi_audit()
+osi_audit(void)
 {
 /* this sucks but it works for now.
 */
index 1e996fbf3e69d396ae8d7d74ad31309a9b85853b..1de8312081e9d52a6bc063e262296c1ffb32c5f0 100644 (file)
 #include "update.h"
 #include "global.h"
 
-extern int UPDATE_ExecuteRequest();
+extern int UPDATE_ExecuteRequest(struct rx_call *);
 
 static int AddObject(char **expPath, char *dir);
 static int PathInDirectory(char *dir, char *path);
+int update_SendFile(int, struct rx_call *, struct stat *);
+int update_SendDirInfo(char *, struct rx_call *, struct stat *,
+                      char *origDir);
 
 struct afsconf_dir *cdir;
 int nDirs;
@@ -60,7 +63,7 @@ char *dirName[MAXENTRIES];
 int dirLevel[MAXENTRIES];
 char *whoami;
 
-static int Quit();
+static int Quit(char *);
 
 int rxBind = 0;
 
@@ -165,7 +168,7 @@ AuthOkay(struct rx_call *call, char *name)
 }
 
 int
-osi_audit()
+osi_audit(void)
 {
 /* this sucks but it works for now.
 */
@@ -400,10 +403,9 @@ UPDATE_FetchInfo(struct rx_call *call, char *name)
 }
 
 static int
-Quit(msg, a, b)
-     char *msg;
+Quit(char *msg)
 {
-    fprintf(stderr, msg, a, b);
+    fprintf(stderr, msg);
     exit(1);
 }
 
index 323e892963fa88bbad588f10e078f63388b81f4c..0872633441fdd330bffe98d62eb4d5de0e276c38 100644 (file)
@@ -13,6 +13,8 @@ statindex 13
 
 %#include <rx/rx.h>
 %#include <rx/rx_null.h>
+%#include "global.h"
+%#include "update_internal.h"
 
 %#define       UPDATE_SERVICEPORT                      htonl(0) /* user server's port */
 %#define       UPDATE_SERVICEID                        4
diff --git a/src/update/update_internal.h b/src/update/update_internal.h
new file mode 100644 (file)
index 0000000..b25d72e
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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 AFS_SRC_UPDATE_INTERNAL_H
+#define AFS_SRC_UPDATE_INTERNAL_H
+
+/* utils.c */
+
+extern int AddToList(struct filestr **, char *);
+extern int ZapList(struct filestr **);
+
+/* server.c */
+
+extern int UPDATE_FetchFile(struct rx_call *, char *);
+extern int UPDATE_FetchInfo(struct rx_call *, char *);
+
+#endif
+