powerpc-utils/SOURCES/powerpc-utils-8a7aa61c5f520...

34 lines
1015 B
Diff

commit 8a7aa61c5f520df03e53e6f7e1d63b7d5c432376
Author: Wen Xiong <wenxiong@linux.ibm.com>
Date: Wed Nov 15 14:37:43 2023 -0600
powerpc-utils/scripts/ofpathname: handle nsid of nvme device as hex number
Installation fails if nsid of nvme device is greater than 10.
The patch fixes the issue and handle nsid of nvme ad a hex number.
Signed-off-by: Wen Xiong <wenxiong@linux.ibm.com>
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
diff --git a/scripts/ofpathname b/scripts/ofpathname
index 3abe4d1..833d03f 100755
--- a/scripts/ofpathname
+++ b/scripts/ofpathname
@@ -722,6 +722,7 @@ l2of_nvme()
err $ERR_NO_OFPATH
fi
+ devnsid=$(printf "%x" $devnsid)
OF_PATH="$OF_PATH/$devtype@$devnsid"
# No partition (pZ) specified.
@@ -1798,6 +1799,7 @@ of2l_nvme()
cd $dir
local devnsid=`$CAT ./nsid 2>/dev/null`
+ devnsid=$(printf "%x" $devnsid)
if [[ $devnsid = $nsid ]]; then
LOGICAL_DEVNAME="${dir##*/}"
break