mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-26 09:10:53 +00:00
2008-02-07 Christian Franke <franke@computer.org>
* util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
instead of fseek and ftell to support large files.
(grub_hostfs_read): Likewise.
This commit is contained in:
1 parent
f2156fda69
commit
1ec8425d1d
2 files changed
+10
-4
No files matched your search
@@ -1,3 +1,9 @@
|
|||||||
|
2008-02-07 Christian Franke <franke@computer.org>
|
||||||
|
|
||||||
|
* util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
|
||||||
|
instead of fseek and ftell to support large files.
|
||||||
|
(grub_hostfs_read): Likewise.
|
||||||
|
|
||||||
2008-02-07 Robert Millan <rmh@aybabtu.com>
|
2008-02-07 Robert Millan <rmh@aybabtu.com>
|
||||||
|
|
||||||
Patch from Jeroen Dekkers.
|
Patch from Jeroen Dekkers.
|
||||||
|
|||||||
+4
-4
@@ -100,9 +100,9 @@ grub_hostfs_open (struct grub_file *file, const char *name)
|
|||||||
"can't open `%s'", name);
|
"can't open `%s'", name);
|
||||||
file->data = f;
|
file->data = f;
|
||||||
|
|
||||||
fseek (f, 0, SEEK_END);
|
fseeko (f, 0, SEEK_END);
|
||||||
file->size = ftell (f);
|
file->size = ftello (f);
|
||||||
fseek (f, 0, SEEK_SET);
|
fseeko (f, 0, SEEK_SET);
|
||||||
|
|
||||||
return GRUB_ERR_NONE;
|
return GRUB_ERR_NONE;
|
||||||
}
|
}
|
||||||
@@ -113,7 +113,7 @@ grub_hostfs_read (grub_file_t file, char *buf, grub_size_t len)
|
|||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
f = (FILE *) file->data;
|
f = (FILE *) file->data;
|
||||||
fseek (f, file->offset, SEEK_SET);
|
fseeko (f, file->offset, SEEK_SET);
|
||||||
int s = fread (buf, 1, len, f);
|
int s = fread (buf, 1, len, f);
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
|
|||||||
Reference in new issue
Block a user