qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] fix incorrect bracket in tracetool


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] fix incorrect bracket in tracetool
Date: Fri, 16 Mar 2012 14:18:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1

Il 16/03/2012 13:29, Lee Essen ha scritto:
> @@ -123,7 +123,7 @@ get_argc()
>  # Get the format string including double quotes for a trace event
>  get_fmt()
>  {
> -    puts "${1#*)}"
> +    puts "${1#*}"
>  }
>  

Eric, can you look at this?  Is it a bashism or a Solaris bug?

I would write it, to be entirely safe, as

   local fmt
   fmt=${1#*\)}
   puts "$fmt"

where I'm using the extra variable to avoid the ambiguity of quoting the
parentheses within quotes; variable assignments are always implicitly
quoted.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]