[PATCH 1/1] powerpc-utils/scripts/ofpathname: handle nsid of nvme device as hex number

3 views
Skip to first unread message

wenxiong@linux.ibm.com

<wenxiong@linux.ibm.com>
unread,
Nov 15, 2023, 5:31:41 PM11/15/23
to tyreld@linux.ibm.com, powerpc-utils-devel@googlegroups.com, wenxiong@us.ibm.com, Wen Xiong
From: Wen Xiong <wenx...@linux.ibm.com>

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 <wenx...@linux.ibm.com>
---
scripts/ofpathname | 2 ++
1 file changed, 2 insertions(+)

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
--
2.39.3

Tyrel Datwyler

<tyreld@linux.ibm.com>
unread,
Nov 29, 2023, 5:32:51 PM11/29/23
to wenxiong@linux.ibm.com, powerpc-utils-devel@googlegroups.com, wenxiong@us.ibm.com
On 11/15/23 12:37, wenx...@linux.ibm.com wrote:
> From: Wen Xiong <wenx...@linux.ibm.com>
>
> 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 <wenx...@linux.ibm.com>
> ---

Patch applied to powerpc-utils/next branch:

https://github.com/ibm-power-utilities/powerpc-utils/commit/8a7aa61c5f520df03e53e6f7e1d63b7d5c432376

Thanks,
-Tyrel

Reply all
Reply to author
Forward
0 new messages