From: Nicolas Palix <npalix.work@gmail.com>
To: Randy Dunlap <rdunlap@xenotime.net>,
Nicolas Palix <npalix.work@gmail.com>,
Julia Lawall <julia@diku.dk>, Michal Marek <mmarek@suse.cz>,
Kulikov Vasiliy <segooon@gmail.com>,
Gilles Muller <Gilles.Muller@lip6.fr>,
Sam Ravnborg <sam@ravnborg.org>,
Joerg Roedel <joerg.roedel@amd.com>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
cocci@diku.dk
Subject: [PATCH 4/4] Coccinelle: Add contextual message
Date: Sun, 24 Oct 2010 23:37:34 +0200 [thread overview]
Message-ID: <1287956254-15563-4-git-send-email-npalix.work@gmail.com> (raw)
Change the message displayed to the user according
to the current mode used.
Fix trailing white-space and spelling
Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
---
scripts/coccicheck | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/scripts/coccicheck b/scripts/coccicheck
index 7529af1..1bb1a1b 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -32,7 +32,7 @@ if [ "$MODE" = "" ] ; then
fi
MODE="chain"
elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then
- FLAGS="$FLAGS -no_show_diff"
+ FLAGS="$FLAGS -no_show_diff"
fi
if [ "$ONLINE" = "0" ] ; then
@@ -47,7 +47,7 @@ coccinelle () {
OPT=`grep "Option" $COCCI | cut -d':' -f2`
-# The option '-parse_cocci' can be used to syntaxically check the SmPL files.
+# The option '-parse_cocci' can be used to syntactically check the SmPL files.
#
# $SPATCH -D $MODE $FLAGS -parse_cocci $COCCI $OPT > /dev/null
@@ -62,7 +62,17 @@ coccinelle () {
sed -ne 's|^///||p' $COCCI
- echo ' The semantic patch that makes this change is available'
+ if [ "$MODE" = "patch" ] ; then
+ echo ' The semantic patch that makes this change is available'
+ elif [ "$MODE" = "report" ] ; then
+ echo ' The semantic patch that makes this report is available'
+ elif [ "$MODE" = "context" ] ; then
+ echo ' The semantic patch that spots this code is available'
+ elif [ "$MODE" = "org" ] ; then
+ echo ' The semantic patch that makes this Org report is available'
+ else
+ echo ' The semantic patch that makes this output is available'
+ fi
echo " in $FILE."
echo ''
echo ' More information about semantic patching is available at'
--
1.7.0.4
reply other threads:[~2010-10-24 21:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1287956254-15563-4-git-send-email-npalix.work@gmail.com \
--to=npalix.work@gmail.com \
--cc=Gilles.Muller@lip6.fr \
--cc=cocci@diku.dk \
--cc=joerg.roedel@amd.com \
--cc=julia@diku.dk \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=rdunlap@xenotime.net \
--cc=sam@ravnborg.org \
--cc=segooon@gmail.com \
/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
Powered by JetHome