Hi,

NetBSD does not know about BLKSSZGET.  The attached patch retrieves
the sector size from the disk label (for NetBSD).

Grégoire
=== modified file 'ChangeLog'
--- ChangeLog   2011-07-02 19:22:19 +0000
+++ ChangeLog   2011-07-03 22:52:47 +0000
@@ -1,3 +1,8 @@
+2011-07-03  Grégoire Sutre  <gregoire.su...@gmail.com>
+
+       * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_open) [__NetBSD__]:
+       Get sector size from disk label.
+
 2011-07-02  Grégoire Sutre  <gregoire.su...@gmail.com>
 
        * util/grub-mkconfig.in: Use @PACKAGE@ instead of hardcoded name when

=== modified file 'grub-core/kern/emu/hostdisk.c'
--- grub-core/kern/emu/hostdisk.c       2011-06-23 20:02:05 +0000
+++ grub-core/kern/emu/hostdisk.c       2011-07-03 22:49:26 +0000
@@ -301,11 +301,15 @@
        goto fail;
       }
 
+# if defined(__NetBSD__)
+    sector_size = label.d_secsize;
+# else
     if (ioctl (fd, BLKSSZGET, &sector_size))
        {
          close (fd);
         goto fail;
        }
+# endif
 
     close (fd);
 
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to