qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] configure: Quote the configure args printed in


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH] configure: Quote the configure args printed in config.log
Date: Wed, 07 Mar 2012 19:14:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1

On 03/07/2012 02:16 PM, Peter Maydell wrote:
> Use the same mechanism we use for printing the configure command
> line to config-host.mak to print it to config.log. This fixes a
> bug where the config.log version didn't quote arguments with spaces.
>  
>  # Print a helpful header at the top of config.log
>  echo "# QEMU configure log $(date)" >> config.log
> -echo "# produced by $0 $*" >> config.log
> +printf "# Configured with:" >> config.log
> +printf " '%s'" "$0" "$@" >> config.log
> +echo >> config.log
>  echo "#" >> config.log
>  

This still breaks if an argument has a single quote.  bash's printf's %q
deals with this correctly, but not sure how portable it is.

-- 
error compiling committee.c: too many arguments to function




reply via email to

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