]> andersk Git - moira.git/blobdiff - afssync/ptdump.c
Remove `delete_user_by_uid' since it's never been used in any logs we have,
[moira.git] / afssync / ptdump.c
index 2e537028f440fbeaeeff0c7eef77223e0d481dd9..07742d768a6b130f78d9ed71b6479b30cb3f1156 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 <lock.h>
 #include <netinet/in.h>
@@ -43,6 +43,7 @@ char **argv;
     char file[512];
     register struct ubik_hdr *uh;
     int didit;
+    setvbuf(stdout, NULL, _IOLBF, BUFSIZ);
     strcpy(file, "/usr/afs/db/prdb.DB0");
     while ((cc = getopt(argc, argv, "f:gnc")) != EOF) {
        switch (cc) {
@@ -81,7 +82,7 @@ char **argv;
     if (ntohl(uh->magic) != UBIK_MAGIC)
        fprintf(stderr, "ptdump: %s: Bad UBIK_MAGIC. Is %x should be %x\n",
                file, 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(fd, &prh, sizeof(struct prheader)) < 0) {
@@ -168,6 +169,7 @@ int fd;
     printf("Group: %s\n", pre->name);
     for (i = 0; i < PRSIZE; i++) {
        if (pre->entries[i] == 0) break;
+       if (pre->entries[i] == PRBADID) continue;
        printf("   Member:  %s\n", id_to_name(pre->entries[i], fd));
     }
     if (i == PRSIZE) {
@@ -179,6 +181,7 @@ int fd;
            for (i = 0; i < COSIZE; i++) {
                prco.entries[i] = ntohl(prco.entries[i]);
                if (prco.entries[i] == 0) break;
+               if (prco.entries[i] == PRBADID) continue;
                printf("   Member(co):  %s\n", id_to_name(prco.entries[i], fd));
            }
            if ((i == COSIZE) && prco.next)
This page took 0.0575 seconds and 4 git commands to generate.