Lines Matching refs:sectorsize
55 static void speeddisk(int fd, off_t mediasize, u_int sectorsize);
56 static void commandtime(int fd, off_t mediasize, u_int sectorsize);
64 u_int sectorsize, fwsectors, fwheads;
105 error = ioctl(fd, DIOCGSECTORSIZE, §orsize);
125 printf("\t%u", sectorsize);
127 printf("\t%jd", (intmax_t)mediasize/sectorsize);
132 (fwsectors * fwheads * sectorsize));
140 printf("\t%-12u\t# sectorsize\n", sectorsize);
144 (intmax_t)mediasize/sectorsize);
149 (fwsectors * fwheads * sectorsize));
160 commandtime(fd, mediasize, sectorsize);
162 speeddisk(fd, mediasize, sectorsize);
174 rdsect(int fd, off_t blockno, u_int sectorsize)
178 if (lseek(fd, (off_t)blockno * sectorsize, SEEK_SET) == -1)
180 error = read(fd, sector, sectorsize);
183 if (error != (int)sectorsize)
238 speeddisk(int fd, off_t mediasize, u_int sectorsize)
243 sectorcount = mediasize / sectorsize;
260 rdsect(fd, b0, sectorsize);
262 rdsect(fd, b1, sectorsize);
272 rdsect(fd, b0, sectorsize);
274 rdsect(fd, b1, sectorsize);
283 rdsect(fd, b0, sectorsize);
285 rdsect(fd, b1, sectorsize);
294 rdsect(fd, b0, sectorsize);
303 rdsect(fd, b0, sectorsize);
312 rdsect(fd, b0, sectorsize);
321 rdsect(fd, b0, sectorsize);
328 rdsect(fd, 0, sectorsize);
336 b0 = sectorcount / 2 - bulk * (1024*1024 / sectorsize) / 2 - 1;
337 rdsect(fd, b0, sectorsize);
345 b0 = sectorcount - bulk * (1024*1024 / sectorsize) - 1;
346 rdsect(fd, b0, sectorsize);
358 commandtime(int fd, off_t mediasize, u_int sectorsize)
365 rdsect(fd, 0, sectorsize);
376 rdsect(fd, 0, sectorsize);
379 rdsect(fd, 0, sectorsize);