View | Details | Raw Unified | Return to bug 17640
Collapse All | Expand All

(-)sbin/dump/traverse.c (-4 / +1 lines)
Lines 556-565 Link Here
556
	extern int errno;
556
	extern int errno;
557
557
558
loop:
558
loop:
559
	if (lseek(diskfd, ((off_t)blkno << dev_bshift), 0) !=
559
	if ((cnt = pread(diskfd, buf, size, (off_t)blkno << dev_bshift)) == size)
560
						((off_t)blkno << dev_bshift))
561
		msg("bread: lseek fails\n");
562
	if ((cnt = read(diskfd, buf, size)) == size)
563
		return;
560
		return;
564
	if (blkno + (size / dev_bsize) > fsbtodb(sblock, sblock->fs_size)) {
561
	if (blkno + (size / dev_bsize) > fsbtodb(sblock, sblock->fs_size)) {
565
		/*
562
		/*
(-)sbin/fsck/utilities.c (-4 / +2 lines)
Lines 327-337 Link Here
327
327
328
	offset = blk;
328
	offset = blk;
329
	offset *= dev_bsize;
329
	offset *= dev_bsize;
330
	if (lseek(fd, offset, 0) < 0)
330
	if (pread(fd, buf, (int)size, offset) == size)
331
		rwerror("SEEK", blk);
332
	else if (read(fd, buf, (int)size) == size)
333
		return (0);
331
		return (0);
334
	rwerror("READ", blk);
332
	rwerror("PREAD", blk);
335
	if (lseek(fd, offset, 0) < 0)
333
	if (lseek(fd, offset, 0) < 0)
336
		rwerror("SEEK", blk);
334
		rwerror("SEEK", blk);
337
	errs = 0;
335
	errs = 0;

Return to bug 17640