* [PATCH] Sector size on NetBSD
@ 2011-07-03 23:31 Grégoire Sutre
2011-07-21 11:12 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 2+ messages in thread
From: Grégoire Sutre @ 2011-07-03 23:31 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 133 bytes --]
Hi,
NetBSD does not know about BLKSSZGET. The attached patch retrieves
the sector size from the disk label (for NetBSD).
Grégoire
[-- Attachment #2: patch-sector-size-from-disklabel --]
[-- Type: text/plain, Size: 846 bytes --]
=== 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.sutre@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.sutre@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, §or_size))
{
close (fd);
goto fail;
}
+# endif
close (fd);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Sector size on NetBSD
2011-07-03 23:31 [PATCH] Sector size on NetBSD Grégoire Sutre
@ 2011-07-21 11:12 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-07-21 11:12 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 426 bytes --]
On 04.07.2011 01:31, Grégoire Sutre wrote:
> Hi,
>
> NetBSD does not know about BLKSSZGET. The attached patch retrieves
> the sector size from the disk label (for NetBSD).
>
Go ahead
> Grégoire
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-21 11:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-03 23:31 [PATCH] Sector size on NetBSD Grégoire Sutre
2011-07-21 11:12 ` Vladimir 'φ-coder/phcoder' Serbinenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.