search for: d_secsize

Displaying 1 result from an estimated 1 matches for "d_secsize".

2003 Sep 06
0
KERNEL BUG: lseek() broken on raw devices
...? argv[1] : "/dev/rda0s1f", O_RDWR); int want = 0x66, t; struct disklabel dl; char *x; if (fd < 0) barf("open"); if (0 == ioctl(fd, DIOCGDINFO, &dl)) { printf("sector size: %lu\n", (unsigned long)(bs = dl.d_secsize)) ; } else barf("ioctl DIOCGDINFO"); /* this writes bs = blocksize times the byte 0x66 at offset #0 * then seeks to offset #bs/2 then writes bs times the byte 0x33. */ if (!(x = malloc(bs))) barf("malloc"); memset(x, want, bs);...