dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0017-freebsd-hostdisk.c-is-only-ever-compiled-on-FreeBSD.patch

4fe85b
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
4fe85b
From: Colin Watson <cjwatson@ubuntu.com>
4fe85b
Date: Fri, 17 Jan 2014 02:30:52 +0000
4fe85b
Subject: [PATCH] freebsd/hostdisk.c is only ever compiled on FreeBSD
4fe85b
4fe85b
* grub-core/osdep/freebsd/hostdisk.c (grub_util_fd_open): Remove
4fe85b
redundant preprocessor conditional.
4fe85b
---
4fe85b
 grub-core/osdep/freebsd/hostdisk.c | 2 --
4fe85b
 ChangeLog                          | 5 +++++
4fe85b
 2 files changed, 5 insertions(+), 2 deletions(-)
4fe85b
4fe85b
diff --git a/grub-core/osdep/freebsd/hostdisk.c b/grub-core/osdep/freebsd/hostdisk.c
4fe85b
index bd5fddb9150..eb202dcc831 100644
4fe85b
--- a/grub-core/osdep/freebsd/hostdisk.c
4fe85b
+++ b/grub-core/osdep/freebsd/hostdisk.c
4fe85b
@@ -108,7 +108,6 @@ grub_util_fd_open (const char *os_dev, int flags)
4fe85b
 
4fe85b
   ret = open (os_dev, flags, S_IROTH | S_IRGRP | S_IRUSR | S_IWUSR);
4fe85b
 
4fe85b
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
4fe85b
   if (! (sysctl_oldflags & 0x10)
4fe85b
       && sysctlbyname ("kern.geom.debugflags", NULL , 0, &sysctl_oldflags, sysctl_size))
4fe85b
     {
4fe85b
@@ -116,7 +115,6 @@ grub_util_fd_open (const char *os_dev, int flags)
4fe85b
       close (ret);
4fe85b
       return GRUB_UTIL_FD_INVALID;
4fe85b
     }
4fe85b
-#endif
4fe85b
 
4fe85b
   return ret;
4fe85b
 }
4fe85b
diff --git a/ChangeLog b/ChangeLog
4fe85b
index b445f121586..6613b4ee52b 100644
4fe85b
--- a/ChangeLog
4fe85b
+++ b/ChangeLog
4fe85b
@@ -1,3 +1,8 @@
4fe85b
+2014-01-17  Colin Watson  <cjwatson@debian.org>
4fe85b
+
4fe85b
+	* grub-core/osdep/freebsd/hostdisk.c (grub_util_fd_open): Remove
4fe85b
+	redundant preprocessor conditional.
4fe85b
+
4fe85b
 2014-01-08  Colin Watson  <cjwatson@ubuntu.com>
4fe85b
 
4fe85b
 	* Makefile.util.def (grub-macbless): Change mansection to 8.