From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 7 Apr 1996 00:49:30 -0500 From: scott@angora.cse.psu.edu scott@angora.cse.psu.edu Subject: No subject Topicbox-Message-UUID: 42723bb2-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19960407054930.Ka3fH8PXAkw58nHZ6LSqbCQkaZTBiDlvKNf0JtWRMDU@z> tarfs reports checksum errors on some tarfiles (generated by gnutar, I think), because it computes the checksum over all TBLOCK chars, but only reads the header before doing so. The following patch seems to fix the problem. term% diff /n/cd/sys/src/cmd/tapefs/tarfs.c . 38c38 < long blkno, isabs, chksum, linkflg; --- > long blkno, isabs, chksum, linkflg, t; 47c47 < if (read(tapefile, (char *)&dblock.dbuf, sizeof(dblock.dbuf)) if (read(tapefile, (char *)&dblock, sizeof(dblock)) if (chksum != (t=checksum())){ > fprint(1, "bad checksum %o != %o on %.28s\n", chksum, t, dblock.dbuf.name); 132c132 < i += *cp; --- > i += *cp & 0xff;