* [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
2012-03-30 10:58 ` [Qemu-trivial] [PATCH v3 1/2] tracetool: dtrace: handle in and next reserved words Stefan Hajnoczi
0 siblings, 2 replies; 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
2012-03-30 10:58 ` [Qemu-trivial] [PATCH v3 1/2] tracetool: dtrace: handle in and next reserved words Stefan Hajnoczi
1 sibling, 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 v3 1/2] tracetool: dtrace: handle in and next reserved words
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 10:58 ` Stefan Hajnoczi
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2012-03-30 10:58 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>
> ---
>
> 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(-)
Thanks, I have merged this patch.
Stefan
^ permalink raw reply [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] <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
2012-03-30 10:58 ` [Qemu-trivial] [PATCH v3 1/2] tracetool: dtrace: handle in and next reserved words 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).