projects
/
disktools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c9cc53
)
[PATCH] sgioread: fix -s option
author
Jens Axboe
<axboe@suse.de>
Wed, 23 Nov 2005 11:49:19 +0000
(12:49 +0100)
committer
Jens Axboe
<axboe@suse.de>
Wed, 23 Nov 2005 11:49:19 +0000
(12:49 +0100)
sgioread.c
patch
|
blob
|
blame
|
history
diff --git
a/sgioread.c
b/sgioread.c
index f678fd6d63ca8b91af80964da225186f59efd314..2f1e98889756c17f92850a188968cbd3b1d7d6de 100644
(file)
--- a/
sgioread.c
+++ b/
sgioread.c
@@
-218,6
+218,7
@@
int main(int argc, char *argv[])
buffer = ALIGN(ptr);
lba = start_lba;
+ if (!nr_blocks)
nr_blocks = end_lba - lba + 1;
printf("disk %s: reading LBA %lu -> %lu", device, start_lba, end_lba);
@@
-276,7
+277,7
@@
int main(int argc, char *argv[])
if (fd_out != -1)
write_the_crap(fd_out, buffer, blocks * block_size);
- } while (lba <= end_lba);
+ } while (lba <= end_lba
&& nr_blocks
);
print_datarate(sectors_since_last, time_spent);
printf("\n");