Lines Matching refs:offset
204 static int try_read_skip_blk(int fd, off_t offset, size_t count) {
205 // check that count and offset are aligned to block size
217 if (offset % blksize) {
244 .block = offset / blksize,
255 hexdump8_ex(buf, count, offset);
264 static int cmd_read_blk(const char* dev, off_t offset, size_t count) {
271 // check that count and offset are aligned to block size
276 if (try_read_skip_blk(fd, offset, count) < 0) {
287 if (offset % blksize) {
295 if (offset) {
296 rc = lseek(fd, offset, SEEK_SET);
298 fprintf(stderr, "Error %zd seeking to offset %jd\n", rc, (intmax_t)offset);
309 hexdump8_ex(buf, c, offset);
366 fprintf(stderr, "%s read <blkdev> <offset> <count>\n", argv[0]);