On Wed, Dec 25, 2013 at 12:50:15PM +0200, Marcel Apfelbaum wrote:
> Acpi unit-tests will extract the iasl executable
> from CONFIG_IASL define.
> 
> Signed-off-by: Marcel Apfelbaum <marce...@redhat.com>
> ---
>  scripts/create_config | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/scripts/create_config b/scripts/create_config
> index b1adbf5..0478315 100755
> --- a/scripts/create_config
> +++ b/scripts/create_config
> @@ -26,6 +26,10 @@ case $line in
>      # save for the next definitions
>      prefix=${line#*=}
>      ;;
> + IASL=*) # iasl executable
> +    value=${line#*=}
> +    echo "#define CONFIG_IASL \"$value\""
> +    ;;

This won't work correctly if IASL includes any
special characters like \ or '.
It's a good idea to use preprocessor's # operator,
that escapes them properly.
We have a bunch of macros like this all over the place, short term
you can introduce
#define CONFIG_STRINGIFY(x) #x
longer term we really want QEMU_STRINGIFY.

>   CONFIG_AUDIO_DRIVERS=*)
>      drivers=${line#*=}
>      echo "#define CONFIG_AUDIO_DRIVERS \\"
> -- 
> 1.8.3.1

Reply via email to