Different changes following Robert's email 20091121230904.GA29740@thorin

This commit is contained in:
Carles Pina i Estany 2009-11-22 11:49:54 +00:00
parent ee99edc809
commit 0648f857ea
8 changed files with 107 additions and 113 deletions

View file

@ -164,3 +164,13 @@ grub_file_seek (grub_file_t file, grub_off_t offset)
file->offset = offset;
return old;
}
grub_ssize_t
grub_file_pread (grub_file_t file, void *buf, grub_size_t len, grub_off_t offset)
{
if (grub_file_seek (file, offset) == (grub_off_t)-1)
{
return -1;
}
return grub_file_read (file, buf, len);
}