Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VTqFA-0002x8-4m for mharc-grub-devel@gnu.org; Wed, 09 Oct 2013 05:39:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTqF4-0002wX-9V for grub-devel@gnu.org; Wed, 09 Oct 2013 05:39:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTqF0-0008VN-47 for grub-devel@gnu.org; Wed, 09 Oct 2013 05:39:42 -0400 Received: from gg6-2.genua.de ([2001:a60:f08e:c000::2]:41302 helo=gg.genua.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTqEz-0008Tb-Sc for grub-devel@gnu.org; Wed, 09 Oct 2013 05:39:38 -0400 Received: from gg.genua.de (localhost.genua.de [127.0.0.1]) by gg.genua.de (8.14.5/8.14.5) with ESMTP id r999dTPn007778 for ; Wed, 9 Oct 2013 11:39:29 +0200 (CEST) Received: (from localhost) by gg.genua.de (MSCAN) id 3/gg.genua.de/smtp-gw/mscan; Wed Oct 9 11:39:28 2013 From: Ilya Bakulin To: The development of GNU GRUB Subject: [PATCH] A couple of fixes for OpenBSD Date: Wed, 9 Oct 2013 11:39:20 +0200 User-Agent: KMail/1.9.10 (enterprise35 20120322.0d8ab49a133482885a7a6ae00ec4472b1859206f) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3067734.tYzJHCm1Xj"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-ID: <201310091139.26628.Ilya_Bakulin@genua.de> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:a60:f08e:c000::2 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Oct 2013 09:39:46 -0000 --nextPart3067734.tYzJHCm1Xj Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, attached is a small fix for getroot.c to make the conversion between partit= ion=20 names and drive names work correctly on OpenBSD. After applying this and previous patch, I am able to build GRUB2 both on=20 5.3/amd64 and 5.3/i386 and invoke grub-install, and the GRUB2 gets installe= d=20 in the MBR and then able to load the L4 kernel + tons of modules from FAT32= =20 filesystem (using multiboot). Thanks! diff --git a/contrib/grub2/util/getroot.c b/contrib/grub2/util/getroot.c index 103a3d2..2dd8486 100644 =2D-- a/contrib/grub2/util/getroot.c +++ b/contrib/grub2/util/getroot.c @@ -913,7 +913,7 @@ grub_find_device (const char *dir, dev_t dev) /* Found! */ char *res; char *cwd; =2D#if defined(__NetBSD__) +#if defined(__NetBSD__) || defined(__OpenBSD__) /* Convert this block device to its character (raw) device. */ const char *template =3D "%s/r%s"; #else @@ -2360,7 +2360,7 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev) } free (sys_disk); =20 =2D#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||=20 defined(__APPLE__) || defined(__NetBSD__) || defined (__s +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||=20 defined(__APPLE__) || defined(__NetBSD__) || defined (__s if (! S_ISCHR (st.st_mode)) #else if (! S_ISBLK (st.st_mode)) --nextPart3067734.tYzJHCm1Xj Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAABAgAGBQJSVSRJAAoJEHfg8By8ZAOvGDkP/RJ5dPukGWrgc4R8ZIOOQIjI MVky+xb4y9ueN9QbBbaF4HikEaM/FoYNbgepshwwcE4ocsWO+u6jSW+1x/CvL0xL Ck2hZL1L3abJm7lJH8hmo7eNl/uQYfbuXxcy15K/FZctXmakRqD3dhvq51zRHsPx 2Mmc7QJ9TZb0U94xp8g7bkWnPSWoTAGn9CxwW3blEqmcsoQRYae4lWjF2ONOirKt 0v4S1qLFR/kV6kz4+wAFO5V3fESGFD80cYF5h725NfT0wGd2s9LVZ8OsPSTp23tb ahptxCJJuK+t/4o1Tvy8YH1jaJc68k57NaMMI7bSpShEj6ZW1cFWhwy4PBu3qbcz e40RWZb0V5S70pqDpylh5PoKzm9MBHu2PXEj+6OiQS9IYXcYJo8zO7vV61nO5ATC oFE36qIl3iymXpPifyt51EZbIUeC9aKKHYSKIbmlsOImT3tY6wDItBZjtKp6jxmY 8BHU/pn6RT3JtpKUa65gkTzq6S+bQ1uiclQnS2vUh4yiPziSzn4gNtu10izVf3sS utiTrLEvMRs2+eZYi3cpZ6vIwXO6jqNTbXQzLfWHx5Tq4UNIOJUUd0kvx4VYRxtL BoO18U9S+dlxjq9CDP6FX7Ow+AywKyVqAjCVKz3f4cRm0vdBS5F3D8RCxOIhl3RR KkcKQ8EFGvFO+92RVL70 =70gm -----END PGP SIGNATURE----- --nextPart3067734.tYzJHCm1Xj--