nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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