]> andersk Git - moira.git/commitdiff
Use line-buffered output
authorprobe <probe>
Wed, 17 Jun 1992 16:47:30 +0000 (16:47 +0000)
committerprobe <probe>
Wed, 17 Jun 1992 16:47:30 +0000 (16:47 +0000)
Skip free slots in membership chains (PRBADID entries)

afssync/ptdump.c

index 2e537028f440fbeaeeff0c7eef77223e0d481dd9..369ea7a14eaf35f2282aaacad9ad5d512b5c458d 100644 (file)
@@ -43,6 +43,7 @@ char **argv;
     char file[512];
     register struct ubik_hdr *uh;
     int didit;
+    setlinebuf(stdout);
     strcpy(file, "/usr/afs/db/prdb.DB0");
     while ((cc = getopt(argc, argv, "f:gnc")) != EOF) {
        switch (cc) {
@@ -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.048625 seconds and 5 git commands to generate.