dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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