. 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:
Ben Gras
2007-04-24 13:27:33 +00:00
parent cc7c561d41
commit 8eb09f6ddc
3 changed files with 18 additions and 16 deletions
+2 -2
View File
@@ -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);