* [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; 4+ 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] 4+ 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; 4+ 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] 4+ messages in thread
[parent not found: <1332944776-4037-1-git-send-email-alevy@redhat.com>]
* [Qemu-trivial] [PATCH v3 1/2] tracetool: dtrace: handle in and next reserved words [not found] <1332944776-4037-1-git-send-email-alevy@redhat.com> @ 2012-03-29 21:35 ` Alon Levy 2012-03-29 21:35 ` [Qemu-trivial] [PATCH 2/2] tracetool: dtrace: warn on reserved word usage Alon Levy 0 siblings, 1 reply; 4+ messages in thread From: Alon Levy @ 2012-03-29 21:35 UTC (permalink / raw) To: qemu, qemu-trivial Signed-off-by: Alon Levy <alevy@redhat.com> --- I think I need a qemu-trivial-review too ;) v3: added self (Lee Essen) use post '_' (Stefan Hajnoczi) use case/esca (Eric Blake & Peter Maydell) scripts/tracetool | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/tracetool b/scripts/tracetool index 65bd0a1..ab788f2 100755 --- a/scripts/tracetool +++ b/scripts/tracetool @@ -494,10 +494,12 @@ EOF i=1 for arg in $arglist do - # 'limit' is a reserved keyword - if [ "$arg" = "limit" ]; then - arg="_limit" - fi + # postfix reserved words with '_' + case "$arg" in + limit|in|next|self) + arg="${arg}_" + ;; + esac cat <<EOF $arg = \$arg$i; EOF -- 1.7.9.3 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-trivial] [PATCH 2/2] tracetool: dtrace: warn on reserved word usage 2012-03-29 21:35 ` [Qemu-trivial] [PATCH v3 1/2] tracetool: dtrace: handle in and next reserved words Alon Levy @ 2012-03-29 21:35 ` Alon Levy 2012-03-30 11:00 ` Stefan Hajnoczi 0 siblings, 1 reply; 4+ messages in thread From: Alon Levy @ 2012-03-29 21:35 UTC (permalink / raw) To: qemu, qemu-trivial 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 ab788f2..c2aed8f 100755 --- a/scripts/tracetool +++ b/scripts/tracetool @@ -497,6 +497,7 @@ EOF # postfix reserved words with '_' case "$arg" in limit|in|next|self) + echo "reserved word used in line: $1" 1>&2 arg="${arg}_" ;; esac -- 1.7.9.3 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-trivial] [PATCH 2/2] tracetool: dtrace: warn on reserved word usage 2012-03-29 21:35 ` [Qemu-trivial] [PATCH 2/2] tracetool: dtrace: warn on reserved word usage Alon Levy @ 2012-03-30 11:00 ` Stefan Hajnoczi 0 siblings, 0 replies; 4+ messages in thread From: Stefan Hajnoczi @ 2012-03-30 11:00 UTC (permalink / raw) To: Alon Levy; +Cc: qemu-trivial, qemu On Thu, Mar 29, 2012 at 10:35 PM, Alon Levy <alevy@redhat.com> wrote: > Signed-off-by: Alon Levy <alevy@redhat.com> > --- > scripts/tracetool | 1 + > 1 file changed, 1 insertion(+) I have not merged this patch because I don't want to avoid adding warnings that are only visible when using a specific backend. The problem is that offending trace-events lines will be added and later on someone who uses dtrace will find a whole list of new warnings. Stefan ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-30 11:01 UTC | newest]
Thread overview: 4+ 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
[not found] <1332944776-4037-1-git-send-email-alevy@redhat.com>
2012-03-29 21:35 ` [Qemu-trivial] [PATCH v3 1/2] tracetool: dtrace: handle in and next reserved words Alon Levy
2012-03-29 21:35 ` [Qemu-trivial] [PATCH 2/2] tracetool: dtrace: warn on reserved word usage Alon Levy
2012-03-30 11:00 ` Stefan Hajnoczi
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).