[libvirt] [PATCH] Enhance qemuParseCommandLineKeywords
Matthias Bolte
matthias.bolte at googlemail.com
Tue Jan 19 10:27:47 UTC 2010
2010/1/13 Jiri Denemark <jdenemar at redhat.com>:
> Current version expects name=value,... list and when an incorrect string
> such as "a,b,c=d" would be parsed as "a,b,c" keyword with "d" value
> without reporting any error, which is probably not the expected
> behavior.
>
> This patch adds an extra argument called allowEmptyValue, which if
> non-zero will permit keywords with no value; "a,b=c,,d=" will be parsed
> as follows:
> keyword value
> "a" NULL
> "b" "c"
> "" NULL
> "d" ""
>
> In case allowEmptyValue is zero, the string is required to contain
> name=value pairs only; retvalues is guaranteed to contain non-NULL
> pointers. Now, "a,b,c=d" will result in an error.
>
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
ACK. pushed.
Matthias
More information about the libvir-list
mailing list