]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/fs/zfs/zfs.c (zfs_mount): Fix spurious warning.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 10 Nov 2011 07:43:08 +0000 (08:43 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 10 Nov 2011 07:43:08 +0000 (08:43 +0100)
ChangeLog
grub-core/fs/zfs/zfs.c

index 24a2b783bbbdce17dad5c8d79206d03eda8369cc..2687b65be2f61f8c2b1c568602445334fdc46b93 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-11-10  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/fs/zfs/zfs.c (zfs_mount): Fix spurious warning.
+
 2011-11-10  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Fix ZFS memory and resource leaks.
index 760668940dcfc645a43b23a04a715c1d82290c44..20cba35090301b61c7076bd92fa877ca9a3598ea 100644 (file)
@@ -3227,7 +3227,7 @@ zfs_mount (grub_device_t dev)
 {
   struct grub_zfs_data *data = 0;
   grub_err_t err;
-  objset_phys_t *osp = 0;
+  void *osp = 0;
   grub_size_t ospsize;
   grub_zfs_endian_t ub_endian = GRUB_ZFS_UNKNOWN_ENDIAN;
   uberblock_t *ub;
@@ -3265,7 +3265,7 @@ zfs_mount (grub_device_t dev)
               ? GRUB_ZFS_LITTLE_ENDIAN : GRUB_ZFS_BIG_ENDIAN);
 
   err = zio_read (&ub->ub_rootbp, ub_endian,
-                 (void **) &osp, &ospsize, data);
+                 &osp, &ospsize, data);
   if (err)
     {
       zfs_unmount (data);
@@ -3281,7 +3281,8 @@ zfs_mount (grub_device_t dev)
     }
 
   /* Got the MOS. Save it at the memory addr MOS. */
-  grub_memmove (&(data->mos.dn), &osp->os_meta_dnode, DNODE_SIZE);
+  grub_memmove (&(data->mos.dn), &((objset_phys_t *) osp)->os_meta_dnode,
+               DNODE_SIZE);
   data->mos.endian = (grub_zfs_to_cpu64 (ub->ub_rootbp.blk_prop,
                                         ub_endian) >> 63) & 1;
   grub_free (osp);