scripts: get_feat.pl: substitute s390x with s390
PATCH 1/1 scripts: get_feat.pl: substitute s390x with s390
Both get_feat.pl and list-arch.sh use uname -m to get the machine hardware name to figure out the current architecture if no architecture is specified with a command line option.
This doesn't work for s390, since for 64 bit kernels the hardware name is s390x, while the architecture name within the kernel, as well as in all feature files is s390.
Therefore substitute s390x with s390 similar to what is already done for x86_64 and i386.
--- Documentation/features/list-arch.sh | 2 +- scripts/get_feat.pl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Documentation/features/list-arch.sh +1 -1
@@ -6,6 +6,6 @@ # (If no arguments are given then it will print the host architecture's status.) # -ARCH=${1:-$(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/')} +ARCH=${1:-$(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/' | sed 's/s390x/s390/')} $(dirname $0)/../../scripts/get_feat.pl list --arch $ARCH
scripts/get_feat.pl +2 -2
@@ -512,13 +512,13 @@ print STDERR Data::Dumper->Dump([\%data], [qw(*data)]) if ($debug); # Handles the command # if ($cmd eq "current") { - $arch = qx(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/'); + $arch = qx(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/' | sed 's/s390x/s390/'); $arch =~s/\s+$//; } if ($cmd eq "ls" or $cmd eq "list") { if (!$arch) { - $arch = qx(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/'); + $arch = qx(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/' | sed 's/s390x/s390/'); $arch =~s/\s+$//; }
Signature · 1 line
2.45.2
Quoted 8 lines · Heiko Carstens
Both get_feat.pl and
list-arch.shuse uname -m to get the machine hardware name to figure out the current architecture if no architecture is specified with a command line option.This doesn't work for s390, since for 64 bit kernels the hardware name is s390x, while the architecture name within the kernel, as well as in all feature files is s390.
Quoted 8 lines
Therefore substitute s390x with s390 similar to what is already done for
x86_64and i386.Signed-off-by Heiko Carstens <[email protected]>--- Documentation/features/list-arch.sh | 2 +- scripts/get_feat.pl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Applied, thanks.
jon