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