mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 15:22:39 +00:00
- patch from Michael Hohnbaum <hohnbaum@us.ibm.com> to handle sparse files.
This commit is contained in:
1 parent
16ca69f719
commit
577b70d724
2 files changed
+12
-4
No files matched your search
@@ -1,3 +1,7 @@
|
|||||||
|
2004-08-07 Jason Thomas <jason@staff.pnc.com.au>
|
||||||
|
From Michael Hohnbaum <hohnbaum@us.ibm.com>:
|
||||||
|
* stage2/fsys_ext2fs.c (ext2fs_read): Handle sparse files.
|
||||||
|
|
||||||
2004-07-24 Yoshinori K. Okuji <okuji@enbug.org>
|
2004-07-24 Yoshinori K. Okuji <okuji@enbug.org>
|
||||||
|
|
||||||
* stage2/stage2.c (cmain): Terminate DEFAULT_FILE with NUL
|
* stage2/stage2.c (cmain): Terminate DEFAULT_FILE with NUL
|
||||||
|
|||||||
@@ -432,12 +432,16 @@ ext2fs_read (char *buf, int len)
|
|||||||
if (size > len)
|
if (size > len)
|
||||||
size = len;
|
size = len;
|
||||||
|
|
||||||
disk_read_func = disk_read_hook;
|
if (map == 0) {
|
||||||
|
memset ((char *) buf, 0, size);
|
||||||
|
} else {
|
||||||
|
disk_read_func = disk_read_hook;
|
||||||
|
|
||||||
devread (map * (EXT2_BLOCK_SIZE (SUPERBLOCK) / DEV_BSIZE),
|
devread (map * (EXT2_BLOCK_SIZE (SUPERBLOCK) / DEV_BSIZE),
|
||||||
offset, size, buf);
|
offset, size, buf);
|
||||||
|
|
||||||
disk_read_func = NULL;
|
disk_read_func = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
buf += size;
|
buf += size;
|
||||||
len -= size;
|
len -= size;
|
||||||
|
|||||||
Reference in new issue
Block a user