if (c != t) {
if (n == 0) {
bad = short_at(&temp_buf[i]);
- prt("0x%5x\t0x%04x\t0x%04x", offset,
+ prt("%#07x\t%#06x\t%#06x", offset,
short_at(&good_buf[offset]), bad);
op = temp_buf[offset & 1 ? i+1 : i];
}
size--;
}
if (n) {
- prt("\t0x%5x\n", n);
+ prt("\t%#7x\n", n);
if (bad)
prt("operation# (mod 256) for the bad data"
"may be %u\n", ((unsigned)op & 0xff));
ftruncate(fd, (off_t)0);
ftruncate(fd, (off_t)100000);
- fstat(fd, &statbuf);
+ if (fstat(fd, &statbuf)) {
+ prterr("trunc_hack: fstat");
+ statbuf.st_size = -1;
+ }
if (statbuf.st_size != (off_t)100000) {
prt("no extend on truncate! not posix!\n");
exit(130);