dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0028-grub-core-commands-macbless.c-Rename-FILE-and-DIR-to.patch

28f7f8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
39700a
From: Vladimir Serbinenko <phcoder@gmail.com>
39700a
Date: Sat, 18 Jan 2014 19:26:40 +0100
28f7f8
Subject: [PATCH] * grub-core/commands/macbless.c: Rename FILE and DIR to avoid
28f7f8
 conflicts.
39700a
39700a
	Reported by: Andrey Borzenkov.
39700a
---
39700a
 grub-core/commands/macbless.c | 6 +++---
28f7f8
 ChangeLog                     | 7 +++++++
39700a
 2 files changed, 10 insertions(+), 3 deletions(-)
39700a
39700a
diff --git a/grub-core/commands/macbless.c b/grub-core/commands/macbless.c
28f7f8
index c5210833ed0..4724edd7709 100644
39700a
--- a/grub-core/commands/macbless.c
39700a
+++ b/grub-core/commands/macbless.c
39700a
@@ -37,7 +37,7 @@ struct find_node_context
39700a
   grub_uint64_t inode_found;
39700a
   char *dirname;
39700a
   enum
39700a
-  { NONE, FILE, DIR } found;
39700a
+  { FOUND_NONE, FOUND_FILE, FOUND_DIR } found;
39700a
 };
39700a
 
39700a
 static int
39700a
@@ -53,7 +53,7 @@ find_inode (const char *filename,
39700a
 	   && grub_strcasecmp (ctx->dirname, filename) == 0)))
39700a
     {
39700a
       ctx->inode_found = info->inode;
39700a
-      ctx->found = info->dir ? DIR : FILE;
39700a
+      ctx->found = info->dir ? FOUND_DIR : FOUND_FILE;
39700a
     }
39700a
   return 0;
39700a
 }
39700a
@@ -175,7 +175,7 @@ grub_mac_bless_file (grub_device_t dev, const char *path_in, int intel)
39700a
   grub_free (path);
39700a
 
39700a
   return grub_mac_bless_inode (dev, (grub_uint32_t) ctx.inode_found,
39700a
-			       (ctx.found == DIR), intel);
39700a
+			       (ctx.found == FOUND_DIR), intel);
39700a
 }
39700a
 
39700a
 static grub_err_t
28f7f8
diff --git a/ChangeLog b/ChangeLog
28f7f8
index dad469b43b1..9d1a3f051c1 100644
28f7f8
--- a/ChangeLog
28f7f8
+++ b/ChangeLog
28f7f8
@@ -1,3 +1,10 @@
28f7f8
+2014-01-18  Vladimir Serbinenko  <phcoder@gmail.com>
28f7f8
+
28f7f8
+	* grub-core/commands/macbless.c: Rename FILE and DIR to avoid
28f7f8
+	conflicts.
28f7f8
+
28f7f8
+	Reported by: Andrey Borzenkov.
28f7f8
+
28f7f8
 2014-01-18  Andrey Borzenkov <arvidjaar@gmail.com>
28f7f8
 
28f7f8
 	* include/grub/misc.h: Move macros for compiler features to ...