[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] A couple of fixes for OpenBSD
From: |
Ilya Bakulin |
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) |
Hi,
attached is a small fix for getroot.c to make the conversion between partition
names and drive names work correctly on OpenBSD.
After applying this and previous patch, I am able to build GRUB2 both on
5.3/amd64 and 5.3/i386 and invoke grub-install, and the GRUB2 gets installed
in the MBR and then able to load the L4 kernel + tons of modules from FAT32
filesystem (using multiboot).
Thanks!
diff --git a/contrib/grub2/util/getroot.c b/contrib/grub2/util/getroot.c
index 103a3d2..2dd8486 100644
--- 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;
-#if defined(__NetBSD__)
+#if defined(__NetBSD__) || defined(__OpenBSD__)
/* Convert this block device to its character (raw) device. */
const char *template = "%s/r%s";
#else
@@ -2360,7 +2360,7 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev)
}
free (sys_disk);
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||
defined(__APPLE__) || defined(__NetBSD__) || defined (__s
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||
defined(__APPLE__) || defined(__NetBSD__) || defined (__s
if (! S_ISCHR (st.st_mode))
#else
if (! S_ISBLK (st.st_mode))
signature.asc
Description: This is a digitally signed message part.
- [PATCH] A couple of fixes for OpenBSD,
Ilya Bakulin <=