]> andersk Git - moira.git/blobdiff - afssync/pt_util.c
specify path to synctree
[moira.git] / afssync / pt_util.c
index 961a9321f48288343a53f94b2d879c6f227a8bec..85f124ef424eedbe6cdb0f99cb45f574ff5dcd67 100644 (file)
@@ -13,7 +13,7 @@
 #include <sys/time.h>
 #include <stdio.h>
 #include <ctype.h>
-#include <strings.h>
+#include <string.h>
 #include <sys/file.h>
 
 #include <afs/param.h>
@@ -28,8 +28,8 @@
 #include "pterror.h"
 
 #define IDHash(x) (abs(x) % HASHSIZE)
-#define print_id(x) ( ((flags&DO_SYS)==0 && (abs(x)>32767)) || \
-                     ((flags&DO_OTR)==0 && (abs(x)<32768)))
+#define print_id(x) ( ((flags&DO_SYS)==0 && (x<-32767 || x>97536)) || \
+                     ((flags&DO_OTR)==0 && (x>-32768 && x<97537)))
 
 extern char *optarg;
 extern int optind;
@@ -168,7 +168,7 @@ char **argv;
     if (ntohl(uh->magic) != UBIK_MAGIC)
        fprintf(stderr, "ptdump: %s: Bad UBIK_MAGIC. Is %x should be %x\n",
                pfile, ntohl(uh->magic), UBIK_MAGIC);
-    bcopy(&uh->version, &uv, sizeof(struct ubik_version));
+    memcpy(&uv, &uh->version, sizeof(struct ubik_version));
     fprintf(stderr, "Ubik Version is: %d.%d\n",
            uv.epoch, uv.counter);
     if (read(dbase_fd, &prh, sizeof(struct prheader)) < 0) {
@@ -253,6 +253,7 @@ char **argv;
                    code = pr_ReadEntry(0,0,gpos,&gentry);
                    if (!code) {
                        gentry.flags = flags;
+                       gentry.ngroups = quota;
                        code = pr_WriteEntry(0,0,gpos,&gentry);
                    }
                    if (code)
This page took 0.049193 seconds and 4 git commands to generate.