diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-11-30 16:36:32 +0100 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2020-12-03 15:10:14 -0700 |
commit | ca908577790fd0dc3070813b752d7eb7f74e609f (patch) | |
tree | 60e114957e75d030fc749a07561a5b27047932df /Documentation/features | |
parent | ba813f7c2dc894eebcb3f8a66c0e9e26e53a4923 (diff) | |
download | linux-ca908577790fd0dc3070813b752d7eb7f74e609f.tar.gz linux-ca908577790fd0dc3070813b752d7eb7f74e609f.tar.bz2 linux-ca908577790fd0dc3070813b752d7eb7f74e609f.zip |
scripts: get_feat.pl: use its implementation for list-arch.sh
Add support for the same output format as the bash script,
and use its implementation instead of the previous one.
I opted to do such patch in order to have a single script
responsible for parsing Documentation/features and
produce different outputs.
As someone may rely on the past format, which is easy
to parse it, get_feat.pl now gains a new command with
the same output format as the previous script.
As a side effect, the perl script is a lot faster, as it reads
each file only once, instead of parsing files several times
via a for command and grep commands inside it.
This patch also changes the features list order to be
case-insensitive, in order to better match the output of
the existing script.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/a97f49677805ad4e6b982d02c0db8c9dfbbd20a6.1606748711.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/features')
-rwxr-xr-x | Documentation/features/list-arch.sh | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/Documentation/features/list-arch.sh b/Documentation/features/list-arch.sh index 1ec47c3bb5fa..e73aa35848f0 100755 --- a/Documentation/features/list-arch.sh +++ b/Documentation/features/list-arch.sh @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # # Small script that visualizes the kernel feature support status # of an architecture. @@ -7,18 +8,4 @@ ARCH=${1:-$(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/')} -cd $(dirname $0) -echo "#" -echo "# Kernel feature support matrix of the '$ARCH' architecture:" -echo "#" - -for F in */*/arch-support.txt; do - SUBSYS=$(echo $F | cut -d/ -f1) - N=$(grep -h "^# Feature name:" $F | cut -c25-) - C=$(grep -h "^# Kconfig:" $F | cut -c25-) - D=$(grep -h "^# description:" $F | cut -c25-) - S=$(grep -hv "^#" $F | grep -w $ARCH | cut -d\| -f3) - - printf "%10s/%-22s:%s| %35s # %s\n" "$SUBSYS" "$N" "$S" "$C" "$D" -done - +$(dirname $0)/../../scripts/get_feat.pl list --arch $ARCH |