74 lines
2.3 KiB
Diff
74 lines
2.3 KiB
Diff
From 1e02bf7761a443ce164dfad531c62d069fe4a14d Mon Sep 17 00:00:00 2001
|
|
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
|
|
Date: Sun, 14 Apr 2013 16:52:49 +0200
|
|
Subject: [PATCH 301/471] * grub-core/kern/ieee1275/cmain.c
|
|
(grub_ieee1275_find_options): Inline name defines used only once.
|
|
|
|
---
|
|
ChangeLog | 5 +++++
|
|
grub-core/kern/ieee1275/cmain.c | 12 ++++--------
|
|
2 files changed, 9 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/ChangeLog b/ChangeLog
|
|
index 0514e73..9df4d1e 100644
|
|
--- a/ChangeLog
|
|
+++ b/ChangeLog
|
|
@@ -1,5 +1,10 @@
|
|
2013-04-13 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
|
+ * grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options):
|
|
+ Inline name defines used only once.
|
|
+
|
|
+2013-04-13 Vladimir Serbinenko <phcoder@gmail.com>
|
|
+
|
|
Fix memory leaks in ofnet.
|
|
Reported by: Francesco Lavra.
|
|
|
|
diff --git a/grub-core/kern/ieee1275/cmain.c b/grub-core/kern/ieee1275/cmain.c
|
|
index 789669a..5f6a6da 100644
|
|
--- a/grub-core/kern/ieee1275/cmain.c
|
|
+++ b/grub-core/kern/ieee1275/cmain.c
|
|
@@ -43,9 +43,6 @@ grub_ieee1275_set_flag (enum grub_ieee1275_flag flag)
|
|
grub_ieee1275_flags |= (1 << flag);
|
|
}
|
|
|
|
-#define SF "SmartFirmware(tm)"
|
|
-#define OHW "PPC Open Hack'Ware"
|
|
-
|
|
static void
|
|
grub_ieee1275_find_options (void)
|
|
{
|
|
@@ -76,7 +73,8 @@ grub_ieee1275_find_options (void)
|
|
|
|
rc = grub_ieee1275_get_property (openprom, "CodeGen-copyright",
|
|
tmp, sizeof (tmp), 0);
|
|
- if (rc >= 0 && !grub_strncmp (tmp, SF, sizeof (SF) - 1))
|
|
+ if (rc >= 0 && !grub_strncmp (tmp, "SmartFirmware(tm)",
|
|
+ sizeof ("SmartFirmware(tm)") - 1))
|
|
is_smartfirmware = 1;
|
|
|
|
rc = grub_ieee1275_get_property (root, "architecture",
|
|
@@ -191,7 +189,8 @@ grub_ieee1275_find_options (void)
|
|
if (! grub_ieee1275_finddevice ("/rom/boot-rom", &bootrom))
|
|
{
|
|
rc = grub_ieee1275_get_property (bootrom, "model", tmp, sizeof (tmp), 0);
|
|
- if (rc >= 0 && !grub_strncmp (tmp, OHW, sizeof (OHW) - 1))
|
|
+ if (rc >= 0 && !grub_strncmp (tmp, "PPC Open Hack'Ware",
|
|
+ sizeof ("PPC Open Hack'Ware") - 1))
|
|
{
|
|
grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_BROKEN_OUTPUT);
|
|
grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_CANNOT_SET_COLORS);
|
|
@@ -202,9 +201,6 @@ grub_ieee1275_find_options (void)
|
|
}
|
|
}
|
|
|
|
-#undef SF
|
|
-#undef OHW
|
|
-
|
|
void
|
|
grub_ieee1275_init (void)
|
|
{
|
|
--
|
|
1.8.2.1
|
|
|