]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/fs/tar.c (grub_cpio_read): Add read_hook.
authorVladimir Serbinenko <phcoder@gmail.com>
Fri, 1 Nov 2013 22:33:59 +0000 (23:33 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Fri, 1 Nov 2013 22:33:59 +0000 (23:33 +0100)
ChangeLog
grub-core/fs/tar.c

index 33a60b13408af606351a8dfdb70da7a9bca79c18..816d5363fc46694a0cbe2fb8997991157a466a3d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        Rewrite blocklist functions in order to get progress when
index 85382974ce26af27b155c719edab009af0b350bd..7d25791e82a4651461445f057907955dadcd0272 100644 (file)
@@ -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