a5bd9f6
From 473af7902f97c7677c802ab3d2a42be8f39fa30d Mon Sep 17 00:00:00 2001
a5bd9f6
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
a5bd9f6
Date: Fri, 1 Mar 2013 13:46:24 +0100
a5bd9f6
Subject: [PATCH 176/364] 	* grub-core/kern/emu/hostdisk.c
a5bd9f6
 (read_device_map): Remove nested 	function.
a5bd9f6
a5bd9f6
---
a5bd9f6
 ChangeLog                     |  5 +++++
a5bd9f6
 grub-core/kern/emu/hostdisk.c | 15 ++++-----------
a5bd9f6
 2 files changed, 9 insertions(+), 11 deletions(-)
a5bd9f6
a5bd9f6
diff --git a/ChangeLog b/ChangeLog
a5bd9f6
index fda449d..f324b92 100644
a5bd9f6
--- a/ChangeLog
a5bd9f6
+++ b/ChangeLog
a5bd9f6
@@ -1,5 +1,10 @@
a5bd9f6
 2013-03-01  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
 
a5bd9f6
+	* grub-core/kern/emu/hostdisk.c (read_device_map): Remove nested
a5bd9f6
+	function.
a5bd9f6
+
a5bd9f6
+2013-03-01  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
+
a5bd9f6
 	* grub-core/gentrigtables.c: Make tables const.
a5bd9f6
 
a5bd9f6
 2013-03-01  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c
a5bd9f6
index 92ce1d9..62a579b 100644
a5bd9f6
--- a/grub-core/kern/emu/hostdisk.c
a5bd9f6
+++ b/grub-core/kern/emu/hostdisk.c
a5bd9f6
@@ -1209,13 +1209,6 @@ read_device_map (const char *dev_map)
a5bd9f6
   int lineno = 0;
a5bd9f6
   struct stat st;
a5bd9f6
 
a5bd9f6
-  auto void show_error (const char *msg)
a5bd9f6
-    __attribute__ ((noreturn));
a5bd9f6
-  void __attribute__ ((noreturn)) show_error (const char *msg)
a5bd9f6
-    {
a5bd9f6
-      grub_util_error ("%s:%d: %s", dev_map, lineno, msg);
a5bd9f6
-    }
a5bd9f6
-
a5bd9f6
   if (dev_map[0] == '\0')
a5bd9f6
     {
a5bd9f6
       grub_util_info ("no device.map");
a5bd9f6
@@ -1250,14 +1243,14 @@ read_device_map (const char *dev_map)
a5bd9f6
 	{
a5bd9f6
 	  char *tmp;
a5bd9f6
 	  tmp = xasprintf (_("missing `%c' symbol"), '(');
a5bd9f6
-	  show_error (tmp);
a5bd9f6
+	  grub_util_error ("%s:%d: %s", dev_map, lineno, tmp);
a5bd9f6
 	}
a5bd9f6
 
a5bd9f6
       p++;
a5bd9f6
       /* Find a free slot.  */
a5bd9f6
       drive = find_free_slot ();
a5bd9f6
       if (drive < 0)
a5bd9f6
-	show_error (_("device count exceeds limit"));
a5bd9f6
+	grub_util_error ("%s:%d: %s", dev_map, lineno, _("device count exceeds limit"));
a5bd9f6
 
a5bd9f6
       e = p;
a5bd9f6
       p = strchr (p, ')');
a5bd9f6
@@ -1265,7 +1258,7 @@ read_device_map (const char *dev_map)
a5bd9f6
 	{
a5bd9f6
 	  char *tmp;
a5bd9f6
 	  tmp = xasprintf (_("missing `%c' symbol"), ')');
a5bd9f6
-	  show_error (tmp);
a5bd9f6
+	  grub_util_error ("%s:%d: %s", dev_map, lineno, tmp);
a5bd9f6
 	}
a5bd9f6
 
a5bd9f6
       map[drive].drive = 0;
a5bd9f6
@@ -1310,7 +1303,7 @@ read_device_map (const char *dev_map)
a5bd9f6
 	p++;
a5bd9f6
 
a5bd9f6
       if (*p == '\0')
a5bd9f6
-	show_error (_("filename expected"));
a5bd9f6
+	grub_util_error ("%s:%d: %s", dev_map, lineno, _("filename expected"));
a5bd9f6
 
a5bd9f6
       /* NUL-terminate the filename.  */
a5bd9f6
       e = p;
a5bd9f6
-- 
a5bd9f6
1.8.1.4
a5bd9f6