* [Qemu-trivial] [PATCH 1/2] tracetool: dtrace: handle in and next reserved words
[not found] <20120328131634.GY32389@garlic>
@ 2012-03-28 13:32 ` Alon Levy
2012-03-28 13:32 ` [Qemu-trivial] [PATCH 2/2] tracetool: dtrace: warn on reserved word usage Alon Levy
0 siblings, 1 reply; 2+ messages in thread
From: Alon Levy @ 2012-03-28 13:32 UTC (permalink / raw)
To: qemu-trivial, Stefan Hajnoczi; +Cc: Lluís Vilanova
Signed-off-by: Alon Levy <alevy@redhat.com>
---
scripts/tracetool | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/tracetool b/scripts/tracetool
index 65bd0a1..e7cebf3 100755
--- a/scripts/tracetool
+++ b/scripts/tracetool
@@ -494,9 +494,9 @@ EOF
i=1
for arg in $arglist
do
- # 'limit' is a reserved keyword
- if [ "$arg" = "limit" ]; then
- arg="_limit"
+ # 'limit', 'in' and 'next' are reserved keywords
+ if [ "$arg" = "limit" -o "$arg" = "in" -o "$arg" = "next" ]; then
+ arg="_$arg"
fi
cat <<EOF
$arg = \$arg$i;
--
1.7.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Qemu-trivial] [PATCH 2/2] tracetool: dtrace: warn on reserved word usage
2012-03-28 13:32 ` [Qemu-trivial] [PATCH 1/2] tracetool: dtrace: handle in and next reserved words Alon Levy
@ 2012-03-28 13:32 ` Alon Levy
0 siblings, 0 replies; 2+ messages in thread
From: Alon Levy @ 2012-03-28 13:32 UTC (permalink / raw)
To: qemu-trivial, Stefan Hajnoczi; +Cc: Lluís Vilanova
Signed-off-by: Alon Levy <alevy@redhat.com>
---
scripts/tracetool | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/tracetool b/scripts/tracetool
index e7cebf3..d011bb7 100755
--- a/scripts/tracetool
+++ b/scripts/tracetool
@@ -496,6 +496,7 @@ EOF
do
# 'limit', 'in' and 'next' are reserved keywords
if [ "$arg" = "limit" -o "$arg" = "in" -o "$arg" = "next" ]; then
+ echo "reserved word used in line: $1" 1>&2
arg="_$arg"
fi
cat <<EOF
--
1.7.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-28 13:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20120328131634.GY32389@garlic>
2012-03-28 13:32 ` [Qemu-trivial] [PATCH 1/2] tracetool: dtrace: handle in and next reserved words Alon Levy
2012-03-28 13:32 ` [Qemu-trivial] [PATCH 2/2] tracetool: dtrace: warn on reserved word usage Alon Levy
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).