#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>
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) {
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) {
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) {
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)