2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
16 #define BLKSIZE (4096+24) /* actual block size on our backup tapes */
18 afs_int32 glong(cp, index)
22 bcopy(cp+index*4, &temp, sizeof(afs_int32));
26 #include "AFS_component_version_number.c"
33 register afs_int32 code;
39 * The following signal action for AIX is necessary so that in case of a
40 * crash (i.e. core is generated) we can include the user's data section
41 * in the core dump. Unfortunately, by default, only a partial core is
42 * generated which, in many cases, isn't too useful.
46 sigemptyset(&nsa.sa_mask);
47 nsa.sa_handler = SIG_DFL;
48 nsa.sa_flags = SA_FULLDUMP;
49 sigaction(SIGABRT, &nsa, NULL);
50 sigaction(SIGSEGV, &nsa, NULL);
52 fd = open(argv[1], O_RDONLY, 0);
57 for(count=0;;count++) {
58 code = read(fd, tbuffer, BLKSIZE);
60 printf("***EOF***\n");
61 else if (code != BLKSIZE) {
62 printf("failed to read correct number of bytes, read %d\n", code);
68 printf("Block %d is:\n", count);
70 printf("%08x %08x %08x %08x %08x %08x %08x %08x\n", glong(lp, 0), glong(lp, 1), glong(lp, 2),
71 glong(lp, 3), glong(lp, 4), glong(lp, 5), glong(lp, 6), glong(lp, 7));
72 printf("%08x %08x %08x %08x %08x %08x %08x %08x\n", glong(lp, 8), glong(lp, 9), glong(lp, 10),
73 glong(lp, 11), glong(lp, 12), glong(lp, 13), glong(lp, 14), glong(lp, 15));