. readall: use lseek64() to read more than 4GB of a device
. vfs: 64-bit offset support for character device i/o (also remove unused dev_bio function) . memory: /dev/null and /dev/zero are infinitely large, don't stop reading/writing at 4GB
This commit is contained in:
@@ -124,8 +124,8 @@ char *argv[];
|
||||
/* Read the entire file. Try it in large chunks, but if an error
|
||||
* occurs, go to single reads for a while. */
|
||||
while (1) {
|
||||
if(lseek(fd, BLOCK_SIZE * b, SEEK_SET) < 0) {
|
||||
perror("lseek");
|
||||
if(lseek64(fd, mul64u(BLOCK_SIZE, b), SEEK_SET, NULL) < 0) {
|
||||
perror("lseek64");
|
||||
return 1;
|
||||
}
|
||||
s = read(fd, a, BLOCK_SIZE * chunk);
|
||||
|
||||
Reference in New Issue
Block a user