grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] sparc64: Don't use devspec to determine the OBP path


From: Eric Snowberg
Subject: [PATCH] sparc64: Don't use devspec to determine the OBP path
Date: Thu, 18 May 2017 17:10:22 -0600

Don't use devspec to determine the OBP path on SPARC hardware.  Within all
versions of Linux on SPARC, the devspec returns one of three values: 
"none", "vnet-port", or "vdisk".  Unlike on PPC, none of these values 
are useful in determining the OBP path.

Before this patch grub-ofpathname always returned the wrong value
for a virtual disk. For example:

% grub-ofpathname /dev/vdiskc2
vdisk/address@hidden:b

After this patch it now returns the correct value:

% grub-ofpathname /dev/vdiskc2
/address@hidden/address@hidden/address@hidden:b

Orabug: 24459765

Signed-off-by: Eric Snowberg <address@hidden>
---
 grub-core/osdep/linux/ofpath.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/grub-core/osdep/linux/ofpath.c b/grub-core/osdep/linux/ofpath.c
index a79682a..3a8bc95 100644
--- a/grub-core/osdep/linux/ofpath.c
+++ b/grub-core/osdep/linux/ofpath.c
@@ -120,6 +120,7 @@ find_obppath (const char *sysfs_path_orig)
 #endif
 
       fd = open(path, O_RDONLY);
+#ifndef __sparc__
       if (fd < 0 || fstat (fd, &st) < 0)
        {
          if (fd >= 0)
@@ -128,6 +129,7 @@ find_obppath (const char *sysfs_path_orig)
          fd = open(path, O_RDONLY);
        }
 
+#endif
       if (fd < 0 || fstat (fd, &st) < 0)
        {
          if (fd >= 0)
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]