From bf0f3a8c3e44fc13fed325dc7bd797ba04ecdc3e Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Fri, 1 Nov 2013 23:33:59 +0100 Subject: [PATCH] * grub-core/fs/tar.c (grub_cpio_read): Add read_hook. --- ChangeLog | 4 ++++ grub-core/fs/tar.c | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 33a60b134..816d5363f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-11-01 Vladimir Serbinenko + + * grub-core/fs/tar.c (grub_cpio_read): Add read_hook. + 2013-11-01 Vladimir Serbinenko Rewrite blocklist functions in order to get progress when diff --git a/grub-core/fs/tar.c b/grub-core/fs/tar.c index 85382974c..7d25791e8 100644 --- a/grub-core/fs/tar.c +++ b/grub-core/fs/tar.c @@ -297,10 +297,17 @@ static grub_ssize_t grub_cpio_read (grub_file_t file, char *buf, grub_size_t len) { struct grub_archelp_data *data; + grub_ssize_t ret; data = file->data; - return (grub_disk_read (data->disk, 0, data->dofs + file->offset, - len, buf)) ? -1 : (grub_ssize_t) len; + + 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; + data->disk->read_hook = 0; + + return ret; } static grub_err_t