Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP2
powerpc-utils.21082
0001-powerpc-utils-Suppress-errors-reading-kern...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-powerpc-utils-Suppress-errors-reading-kernel-files.patch of Package powerpc-utils.21082
From 73839d6bab4da24350a60105b7b2c3a6cc7d3a15 Mon Sep 17 00:00:00 2001 From: Michael Bringmann <mwb@linux.vnet.ibm.com> Date: Fri, 26 Jul 2019 09:10:51 -0500 Subject: [PATCH] powerpc-utils: Suppress errors reading kernel files References: bsc#1116561 ltc#165182 Upstream: pending - expected 1.3.8 Git-commit: 73839d6bab4da24350a60105b7b2c3a6cc7d3a15 A problem was observed with the evaluation of the '${devspec} by the script 'ofpathname'. The problem occurred during installation to an nvme device as follows: 02:29:41,669 INF program: Running... ofpathname /dev/nvme0n1p1 02:29:41,922 INF program: /sbin/ofpathname: line 684: warning: command substitution: ignored null byte in input Detailed examination showed that instances of the device-tree property "/namespace/name" within one or more of the PCI devices contained null bytes which were echoed along with the value e.g. [root device-tree]# cat /proc/device-tree/pci@800000020000029/pci1014,637@0/namespace/name | hexdump -C 00000000 6e 61 6d 65 73 70 61 63 65 00 |namespace.| 0000000a [root device-tree]# This patch provides improves handling of errors within that script, and by some of the follow-on uses of the tool by the 'bootlist' script. * Deal with error messages returned sometimes by evaluation of ${devspec} in 'ofpathname'. * Strip embedded nulls from values provided by kernel files. * Redirect more error messages to /dev/null Signed-off-by: Michael Bringmann <mwb@linux.vnet.ibm.com> Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> --- scripts/bootlist | 8 ++++---- scripts/ofpathname | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/bootlist b/scripts/bootlist index acdaf8960ad0..1d1c210e69fc 100755 --- a/scripts/bootlist +++ b/scripts/bootlist @@ -169,7 +169,7 @@ get_logical_device_name() local devname=$1 local logical_name - logical_name=`$OFPATHNAME -l $devname 2>/dev/null` + logical_name=`$OFPATHNAME -l $devname 2>/dev/null | tr -d '\000'` if [[ $? -ne 0 ]]; then echo "" else @@ -207,11 +207,11 @@ show_bootlist() local devlist=$1 local i - for i in `$NVRAM --print-config=${devlist} | sed 's/ /\n/g'`; do + for i in `$NVRAM --print-config=${devlist} 2> /dev/null | sed 's/ /\n/g'`; do if [[ $TRANSLATE_NAMES = "yes" ]]; then name=`get_logical_device_name $i` if [[ -z $name ]]; then - echo "Could not translate $i to logical device name" + echo "Could not translate $i to logical device name" 2>&1 else case $name in eth*) parse_eth_info $name $i ;; @@ -230,7 +230,7 @@ show_bootlist() . $PSERIES_PLATFORM if [[ $platform != $PLATFORM_PSERIES_LPAR ]]; then - echo "bootlist: is not supported on the $platform_name platform" + echo "bootlist: is not supported on the $platform_name platform" 2>&1 exit 1 fi diff --git a/scripts/ofpathname b/scripts/ofpathname index dc452c4465ea..7c6345eeaca1 100755 --- a/scripts/ofpathname +++ b/scripts/ofpathname @@ -656,7 +656,7 @@ l2of_nvme() goto_dir $PWD "device/devspec" - devspec=`$CAT $PWD/device/devspec` + devspec=`$CAT $PWD/device/devspec | tr -d '\000'` if [[ -n $devspec ]]; then found=1 break @@ -681,7 +681,7 @@ l2of_nvme() # Device type is usually 'namespace'. # Get it from device-tree just in case. - devtype=`$CAT /proc/device-tree${devspec}/namespace/name` + devtype=`$CAT /proc/device-tree${devspec}/namespace/name | tr -d '\000'` 2> /dev/null if [[ -z $devtype ]]; then err $ERR_NO_OFPATH fi -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor