* grub-core/fs/tar.c (grub_cpio_read): Add read_hook.

This commit is contained in:
Vladimir Serbinenko 2013-11-01 23:33:59 +01:00
parent cb72aa1809
commit bf0f3a8c3e
2 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2013-11-01 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/tar.c (grub_cpio_read): Add read_hook.
2013-11-01 Vladimir Serbinenko <phcoder@gmail.com> 2013-11-01 Vladimir Serbinenko <phcoder@gmail.com>
Rewrite blocklist functions in order to get progress when Rewrite blocklist functions in order to get progress when

View file

@ -297,10 +297,17 @@ static grub_ssize_t
grub_cpio_read (grub_file_t file, char *buf, grub_size_t len) grub_cpio_read (grub_file_t file, char *buf, grub_size_t len)
{ {
struct grub_archelp_data *data; struct grub_archelp_data *data;
grub_ssize_t ret;
data = file->data; data = file->data;
return (grub_disk_read (data->disk, 0, data->dofs + file->offset,
data->disk->read_hook = file->read_hook;
data->disk->read_hook_data = file->read_hook_data;
ret = (grub_disk_read (data->disk, 0, data->dofs + file->offset,
len, buf)) ? -1 : (grub_ssize_t) len; len, buf)) ? -1 : (grub_ssize_t) len;
data->disk->read_hook = 0;
return ret;
} }
static grub_err_t static grub_err_t