40 lines
1.7 KiB
Diff
40 lines
1.7 KiB
Diff
diff -up powerpc-utils-1.3.9/scripts/hcnmgr.me powerpc-utils-1.3.9/scripts/hcnmgr
|
|
--- powerpc-utils-1.3.9/scripts/hcnmgr.me 2021-11-11 11:38:33.293898966 +0100
|
|
+++ powerpc-utils-1.3.9/scripts/hcnmgr 2021-11-11 11:39:19.302587637 +0100
|
|
@@ -168,7 +168,7 @@ search_dev() {
|
|
# Look at pci ethernet devices
|
|
for pci_dev in "$DT_PATH"/pci*; do
|
|
[ -d "$pci_dev" ] || continue
|
|
- index=$(hexdump -n 4 -e '/1 "%02x"' "$pci_dev"/ibm,my-drc-index)
|
|
+ index=$(hexdump -n 4 -ve '/1 "%02x"' "$pci_dev"/ibm,my-drc-index)
|
|
if [[ $index != "$1" ]]; then
|
|
continue
|
|
fi
|
|
@@ -189,7 +189,7 @@ search_dev() {
|
|
hcnlog DEBUG "search vnic device with drc_index $1"
|
|
for dev in "$DT_PATH"/vdevice/vnic*; do
|
|
[ -d "$dev" ] || continue
|
|
- index=$(hexdump -n 4 -e '/1 "%02x"' "$dev"/ibm,my-drc-index)
|
|
+ index=$(hexdump -n 4 -ve '/1 "%02x"' "$dev"/ibm,my-drc-index)
|
|
if [[ $index == "$1" ]]; then
|
|
hcnlog DEBUG "found matching drc_index $index in $dev"
|
|
if [ -e "$dev"/ibm,hcn-id ] && get_dev_hcn "$dev"; then
|
|
@@ -205,7 +205,7 @@ search_dev() {
|
|
hcnlog DEBUG "search ibmveth device with drc_index $1"
|
|
for dev in "$DT_PATH"/vdevice/l-lan*; do
|
|
[ -d "$dev" ] || continue
|
|
- index=$(hexdump -n 4 -e '/1 "%02x"' "$dev"/ibm,my-drc-index)
|
|
+ index=$(hexdump -n 4 -ve '/1 "%02x"' "$dev"/ibm,my-drc-index)
|
|
if [[ $index == "$1" ]]; then
|
|
hcnlog DEBUG "found matching drc_index $index in $dev"
|
|
if [ -e "$dev"/ibm,hcn-id ] && get_dev_hcn "$dev"; then
|
|
@@ -233,7 +233,7 @@ get_dev_hcn() {
|
|
local dev=$1
|
|
|
|
hcnlog DEBUG "get_dev_hcn: enter $1"
|
|
- HCNID=$(hexdump -n 4 -e '/1 "%02x"' "$dev"/ibm,hcn-id)
|
|
+ HCNID=$(hexdump -n 4 -ve '/1 "%02x"' "$dev"/ibm,hcn-id)
|
|
MODE=$(tr -d '\0' <"$dev"/ibm,hcn-mode)
|
|
PHYSLOC=$(tr -d '\0' <"$dev"/ibm,loc-code)
|
|
DEVPATH=$1
|