nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0398-include-grub-arc-arc.h-Account-for-missing-other-per.patch

f96e0b
From f4b8e9c9249112964441d582283761ada51198a7 Mon Sep 17 00:00:00 2001
f96e0b
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
f96e0b
Date: Tue, 30 Apr 2013 17:40:31 +0200
f96e0b
Subject: [PATCH 398/482] 	* include/grub/arc/arc.h: Account for missing
f96e0b
 "other" peripheral on 	ARCS. All users updated.
f96e0b
f96e0b
---
f96e0b
 ChangeLog                      |  5 +++++
f96e0b
 grub-core/kern/mips/arc/init.c |  6 +++++-
f96e0b
 grub-core/term/arc/console.c   | 10 +++++-----
f96e0b
 include/grub/arc/arc.h         |  2 ++
f96e0b
 4 files changed, 17 insertions(+), 6 deletions(-)
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index 6b5feff..b924457 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,5 +1,10 @@
f96e0b
 2013-04-30  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
 
f96e0b
+	* include/grub/arc/arc.h: Account for missing "other" peripheral on
f96e0b
+	ARCS. All users updated.
f96e0b
+
f96e0b
+2013-04-30  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
+
f96e0b
 	* grub-core/kern/mips/loongson/init.c: Support halt for loongson 2E.
f96e0b
 
f96e0b
 2013-04-30  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
diff --git a/grub-core/kern/mips/arc/init.c b/grub-core/kern/mips/arc/init.c
f96e0b
index fdcc2bd..ddee814 100644
f96e0b
--- a/grub-core/kern/mips/arc/init.c
f96e0b
+++ b/grub-core/kern/mips/arc/init.c
f96e0b
@@ -45,7 +45,11 @@ const char *type_names[] = {
f96e0b
   "eisa", "tc", "scsi", "dti", "multi", "disk", "tape", "cdrom", "worm",
f96e0b
   "serial", "net", "video", "par", "point", "key", "audio", "other",
f96e0b
   "rdisk", "fdisk", "tape", "modem", "monitor", "print", "pointer",
f96e0b
-  "keyboard", "term", "other", "line", "network", NULL
f96e0b
+  "keyboard", "term",
f96e0b
+#ifndef GRUB_CPU_WORDS_BIGENDIAN
f96e0b
+  "other",
f96e0b
+#endif
f96e0b
+  "line", "network", NULL
f96e0b
 };
f96e0b
 
f96e0b
 static int
f96e0b
diff --git a/grub-core/term/arc/console.c b/grub-core/term/arc/console.c
f96e0b
index ea4737c..df099f0 100644
f96e0b
--- a/grub-core/term/arc/console.c
f96e0b
+++ b/grub-core/term/arc/console.c
f96e0b
@@ -61,7 +61,7 @@ grub_arc_is_device_serial (const char *name, int alt_names)
f96e0b
   /*
f96e0b
     Recognize:
f96e0b
     serial(N)
f96e0b
-    serial(N)other(M)
f96e0b
+    serial(N)line(M)
f96e0b
    */
f96e0b
   for (i = 0; i < 2; i++)
f96e0b
     {
f96e0b
@@ -84,11 +84,11 @@ grub_arc_is_device_serial (const char *name, int alt_names)
f96e0b
 	  && grub_memcmp (ptr + 1 - (sizeof ("serial") - 1),
f96e0b
 			  "serial", sizeof ("serial") - 1) == 0)
f96e0b
 	return 1;
f96e0b
-      if (!(ptr + 1 >= name + sizeof ("other") - 1
f96e0b
-	    && grub_memcmp (ptr + 1 - (sizeof ("other") - 1),
f96e0b
-			    "other", sizeof ("other") - 1) == 0))
f96e0b
+      if (!(ptr + 1 >= name + sizeof ("line") - 1
f96e0b
+	    && grub_memcmp (ptr + 1 - (sizeof ("line") - 1),
f96e0b
+			    "line", sizeof ("line") - 1) == 0))
f96e0b
 	return 0;
f96e0b
-      ptr -= sizeof ("other") - 1;
f96e0b
+      ptr -= sizeof ("line") - 1;
f96e0b
       if (alt_names)
f96e0b
 	{
f96e0b
 	  if (*ptr != '/')
f96e0b
diff --git a/include/grub/arc/arc.h b/include/grub/arc/arc.h
f96e0b
index c2578f4..7615a49 100644
f96e0b
--- a/include/grub/arc/arc.h
f96e0b
+++ b/include/grub/arc/arc.h
f96e0b
@@ -139,7 +139,9 @@ enum
f96e0b
     GRUB_ARC_COMPONENT_TYPE_POINTER,
f96e0b
     GRUB_ARC_COMPONENT_TYPE_KBD,
f96e0b
     GRUB_ARC_COMPONENT_TYPE_TERMINAL,
f96e0b
+#ifndef GRUB_CPU_WORDS_BIGENDIAN
f96e0b
     GRUB_ARC_COMPONENT_TYPE_OTHER_PERIPHERAL,
f96e0b
+#endif
f96e0b
     GRUB_ARC_COMPONENT_TYPE_LINE,
f96e0b
     GRUB_ARC_COMPONENT_TYPE_NET,
f96e0b
     GRUB_ARC_COMPONENT_TYPE_MEMORY_UNIT,
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b