From 8ca5eb7c6d979911ede3c25c4012e5b3d1e720a9 Mon Sep 17 00:00:00 2001 From: probe Date: Wed, 17 Jun 1992 16:47:30 +0000 Subject: [PATCH 1/1] Use line-buffered output Skip free slots in membership chains (PRBADID entries) --- afssync/ptdump.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/afssync/ptdump.c b/afssync/ptdump.c index 2e537028..369ea7a1 100644 --- a/afssync/ptdump.c +++ b/afssync/ptdump.c @@ -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) -- 2.45.2