File bootlist-Display-logical-name-using-bootlist-o-option.patch of Package powerpc-utils.8895
From c3f583a9f62ee33080523c2d1d076fdf8d5520e7 Mon Sep 17 00:00:00 2001
From: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
Date: Tue, 17 Jul 2018 21:24:31 +0530
Subject: [PATCH] Patch to display logical name using bootlist -o option
Problem:
System unable to boot when OF device path name's set using -r option
EX: # bootlist -m normal -r /vdevice/v-scsi@30000010/disk@8100000000000000
Solution:
This patch is to set respective Open firmware device path names(-r)
and logical device path names(-o) using bootlist
Test Results:
Without patch:
# bootlist -m normal -r /vdevice/v-scsi@30000010/disk@8100000000000000
sda
# bootlist -m normal -r
sda
# bootlist -m normal -o
Could not translate sda to logical device name
With patch:
# ./bootlist -m normal -r /vdevice/v-scsi@30000010/disk@8100000000000000
/vdevice/v-scsi@30000010/disk@8100000000000000
# ./bootlist -m normal -r
/vdevice/v-scsi@30000010/disk@8100000000000000
# ./bootlist -m normal -o
sda
# ./bootlist -m normal -r sda
/vdevice/v-scsi@30000010/disk@8100000000000000
# ./bootlist -m normal -r
/vdevice/v-scsi@30000010/disk@8100000000000000
# ./bootlist -m normal -o
sda
Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
---
scripts/bootlist | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/bootlist b/scripts/bootlist
index 187b08c5578c..65926d72ea54 100755
--- a/scripts/bootlist
+++ b/scripts/bootlist
@@ -453,6 +453,8 @@ if [[ ${#LOGICAL_NAMES[*]} -ne 0 ]]; then
if [[ -z ${OF_DEVPATH[$ctr]} ]]; then
# See if this is an OF pathname
OF_DEVPATH[$ctr]=`get_of_device_name ${LOGICAL_NAMES[$ctr]}`
+ else
+ OF_DEVPATH[$ctr]=${LOGICAL_NAMES[$ctr]}
fi
if [[ -z ${OF_DEVPATH[$ctr]} ]]; then
--
2.13.7