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

23d2ea
From c611b3a4ec67d3fd3886b9bb93ccc41a40de1955 Mon Sep 17 00:00:00 2001
39700a
From: Vladimir Serbinenko <phcoder@gmail.com>
39700a
Date: Sat, 18 Jan 2014 19:26:40 +0100
27a4da
Subject: [PATCH 028/260] * grub-core/commands/macbless.c: Rename FILE and DIR
23d2ea
 to avoid conflicts.
39700a
39700a
	Reported by: Andrey Borzenkov.
39700a
---
39700a
 ChangeLog                     | 7 +++++++
39700a
 grub-core/commands/macbless.c | 6 +++---
39700a
 2 files changed, 10 insertions(+), 3 deletions(-)
39700a
39700a
diff --git a/ChangeLog b/ChangeLog
27a4da
index dad469b43..9d1a3f051 100644
39700a
--- a/ChangeLog
39700a
+++ b/ChangeLog
39700a
@@ -1,3 +1,10 @@
39700a
+2014-01-18  Vladimir Serbinenko  <phcoder@gmail.com>
39700a
+
39700a
+	* grub-core/commands/macbless.c: Rename FILE and DIR to avoid
39700a
+	conflicts.
39700a
+
39700a
+	Reported by: Andrey Borzenkov.
39700a
+
39700a
 2014-01-18  Andrey Borzenkov <arvidjaar@gmail.com>
39700a
 
39700a
 	* include/grub/misc.h: Move macros for compiler features to ...
39700a
diff --git a/grub-core/commands/macbless.c b/grub-core/commands/macbless.c
27a4da
index c5210833e..4724edd77 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
39700a
-- 
27a4da
2.13.0
39700a