commit 04e5c9646296e1f12048723bba4cee663c3f74ed Author: Wen Xiong Date: Thu Dec 1 05:22:37 2022 -0600 ofpathname: Handle nsid as hex in nvmf boot/install support Didn't handle nsid correctly in nvmf boot/install support. Need to handle it as hexadecimal number For example, /pci@800000020000132/fibre-channel@0,1/nvme-of/controller@50050768101935e5,ffff :nqn=nqn.1986-03.com.ibm:nvme:2145.0000020420006CEA/namespace@26c 26c should be a hexadecimal number. Signed-off-by: Wen Xiong Signed-off-by: Tyrel Datwyler diff --git a/scripts/ofpathname b/scripts/ofpathname index c576fb8..3abe4d1 100755 --- a/scripts/ofpathname +++ b/scripts/ofpathname @@ -809,7 +809,7 @@ l2of_nvmf() else goto_dir $res devnsid=`$CAT $PWD/nsid | tr -d '\000'` - devnsid=`echo "obase=16; $devnsid" |bc` + devnsid=$(printf "%x" $devnsid) OF_PATH="$OF_PATH/namespace@$devnsid" fi fi @@ -1886,7 +1886,7 @@ of2l_nvmf() for dev_name in `$FIND /sys/block -name "${ana_name##*/}n[0-9]*"`; do cd $dev_name local devnsid=`$CAT ./nsid 2>/dev/null` - devnsid=`echo "obase=16; $devnsid" |bc` + devnsid=$(printf "%x" $devnsid) if [[ $devnsid = $nsid ]]; then found=1 NS_ID="${dev_name##*n}"