rc = write(fd, wbuf, len);
if (rc != len) {
- printf("Write error %s (rc = %d)\n", strerror(errno), rc);
+ printf("Write error %s (rc = %d)\n",strerror(errno),rc);
return 1;
}
}
return 1;
}
- rbuf = mmap(0, len, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, 0, 0);
+ rbuf =mmap(0,len,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,0,0);
if (rbuf == MAP_FAILED) {
printf("No memory %s\n", strerror(errno));
return 1;
rc = read(fd, rbuf, len);
if (rc != len) {
- printf("Read error: %s (rc = %d)\n", strerror(errno), rc);
+ printf("Read error: %s (rc = %d)\n",strerror(errno),rc);
return 1;
}
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));