diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2025-03-12 16:52:19 +0100 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2025-03-12 16:25:50 -0600 |
commit | 78da89c6398335c3de7c09e319d8e82126f18126 (patch) | |
tree | 638efb42d9c2594ae3ec1a6b658c8f69ff13f9ee /scripts/get_feat.pl | |
parent | 19b100b0116d703b9529f7bbbf797428de51816a (diff) |
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.
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250312155219.3597768-1-hca@linux.ibm.com
Diffstat (limited to 'scripts/get_feat.pl')
-rwxr-xr-x | scripts/get_feat.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/get_feat.pl b/scripts/get_feat.pl index 5c5397eeb237..40fb28c8424e 100755 --- a/scripts/get_feat.pl +++ b/scripts/get_feat.pl @@ -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+$//; } |