windows-64bit-printf-sanity-20090218
[openafs.git] / src / volser / restorevol.c
index 449e7d0..c04f8ea 100644 (file)
@@ -64,14 +64,7 @@ RCSID
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <dirent.h>
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 
 char rootdir[MAXPATHLEN];
@@ -125,7 +118,7 @@ readchar()
 #define BUFSIZE 16384
 char buf[BUFSIZE];
 
-char
+void
 readdata(buffer, size)
      char *buffer;
      afs_sfsize_t size;
@@ -147,7 +140,7 @@ readdata(buffer, size)
            if (code < 0)
                fprintf(stderr, "Code = %d; Errno = %d\n", code, errno);
            else
-               fprintf(stderr, "Read %d bytes out of %lld\n", code, (afs_uintmax_t)size);
+               fprintf(stderr, "Read %d bytes out of %" AFS_INT64_FMT "\n", code, (afs_uintmax_t)size);
        }
        if ((code >= 0) && (code < BUFSIZE))
            buffer[size] = 0;   /* Add null char at end */
@@ -225,6 +218,7 @@ struct volumeHeader {
     int inService;
     int blessed;
     char message[1024];
+    afs_int32 volUpdateCounter;
 };
 
 afs_int32
@@ -351,6 +345,9 @@ ReadVolumeHeader(count)
        case 'Z':
            vh.dayUse = ntohl(readvalue(4));
            break;
+       case 'V':
+            vh.volUpdateCounter = ntohl(readvalue(4));
+           break;
 
        default:
            done = 1;
@@ -795,9 +792,8 @@ ReadVNode(count)
     return ((afs_int32) tag);
 }
 
-WorkerBee(as, arock)
-     struct cmd_syndesc *as;
-     char *arock;
+static int
+WorkerBee(struct cmd_syndesc *as, void *arock)
 {
     int code = 0, c, len;
     afs_int32 type, count, vcount;