From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH v3 2/2] devtools: list symbols by version
Date: Tue, 15 Aug 2023 19:42:49 +0200 [thread overview]
Message-ID: <20230815174249.511589-2-david.marchand@redhat.com> (raw)
In-Reply-To: <20230815174249.511589-1-david.marchand@redhat.com>
Make it easier to list experimental symbols added in a certain version.
Example:
$ ./buildtools/map-list-symbol.sh -V 18.11 lib/eal/version.map
lib/eal/version.map EXPERIMENTAL rte_dev_event_callback_process
lib/eal/version.map EXPERIMENTAL rte_dev_hotplug_handle_disable
lib/eal/version.map EXPERIMENTAL rte_dev_hotplug_handle_enable
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
buildtools/map-list-symbol.sh | 39 ++++++++++++++++++++++-------------
1 file changed, 25 insertions(+), 14 deletions(-)
diff --git a/buildtools/map-list-symbol.sh b/buildtools/map-list-symbol.sh
index 3bf9bd66f8..a834399816 100755
--- a/buildtools/map-list-symbol.sh
+++ b/buildtools/map-list-symbol.sh
@@ -6,7 +6,7 @@ section=all
symbol=all
quiet=
-while getopts 'S:s:q' name; do
+while getopts 'S:s:qV:' name; do
case $name in
S)
[ $section = 'all' ] || {
@@ -25,8 +25,11 @@ while getopts 'S:s:q' name; do
q)
quiet='y'
;;
+ V)
+ version=$OPTARG
+ ;;
?)
- echo 'usage: $0 [-S section] [-s symbol] [-q]'
+ echo 'usage: $0 [-S section] [-s symbol] [-V version] [-q]'
exit 1
;;
esac
@@ -38,7 +41,8 @@ for file in $@; do
cat "$file" |awk '
BEGIN {
current_section = "";
- if ("'$section'" == "all" && "'$symbol'" == "all") {
+ current_version = "";
+ if ("'$section'" == "all" && "'$symbol'" == "all" && "'$version'" == "") {
ret = 0;
} else {
ret = 1;
@@ -49,18 +53,25 @@ for file in $@; do
current_section = $1;
}
}
- /.*}/ { current_section = ""; }
+ /.*}/ { current_section = ""; current_version = ""; }
+ /^\t# added in / {
+ current_version=$4;
+ }
/^[^}].*[^:*];/ {
- if (current_section != "") {
- gsub(";","");
- if ("'$symbol'" == "all" || $1 == "'$symbol'") {
- ret = 0;
- if ("'$quiet'" == "") {
- print "'$file' "current_section" "$1;
- }
- if ("'$symbol'" != "all") {
- exit 0;
- }
+ if (current_section == "") {
+ next;
+ }
+ if ("'$version'" != "" && "'$version'" != current_version) {
+ next;
+ }
+ gsub(";","");
+ if ("'$symbol'" == "all" || $1 == "'$symbol'") {
+ ret = 0;
+ if ("'$quiet'" == "") {
+ print "'$file' "current_section" "$1;
+ }
+ if ("'$symbol'" != "all") {
+ exit 0;
}
}
}
--
2.41.0
next prev parent reply other threads:[~2023-08-15 17:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 15:49 [PATCH] " David Marchand
2023-08-11 17:13 ` Stephen Hemminger
2023-08-14 9:48 ` Thomas Monjalon
2023-08-15 10:01 ` David Marchand
2023-08-15 10:36 ` [PATCH v2 1/2] devtools: add check on symbol maps format David Marchand
2023-08-15 10:36 ` [PATCH v2 2/2] devtools: list symbols by version David Marchand
2023-08-15 17:42 ` [PATCH v3 1/2] devtools: add check on symbol maps format David Marchand
2023-08-15 17:42 ` David Marchand [this message]
2023-08-16 7:16 ` [PATCH v4 " David Marchand
2023-08-16 7:16 ` [PATCH v4 2/2] devtools: list symbols by version David Marchand
2023-11-15 10:42 ` [PATCH v5 1/2] devtools: add check on symbol maps format David Marchand
2023-11-15 10:42 ` [PATCH v5 2/2] devtools: list symbols by version David Marchand
2023-11-27 7:37 ` David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230815174249.511589-2-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).