qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] keyval: accept escaped commas in implied option


From: Paolo Bonzini
Subject: Re: [PATCH 1/2] keyval: accept escaped commas in implied option
Date: Wed, 11 Nov 2020 12:05:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 11/11/20 11:53, Daniel P. Berrangé wrote:
On Wed, Nov 11, 2020 at 05:45:20AM -0500, Paolo Bonzini wrote:
This is used with the weirdly-named device "SUNFD,two", so accepting it
is also a preparatory step towards keyval-ifying -device and the
device_add monitor command.  But in general it is an unexpected wart
of the keyval syntax and leads to suboptimal errors compared to QemuOpts:

If "SUNFD,two" is the only wierdly named device, can we just rename
it to get rid of the comma, and then put validation in QOM to forbid
commas entirely.  eg rename it to "SUNFD-two"

Just have a targetted hack in vl.c to replace any use of "SUNFD,two"
with the new name before parsing in keyval, if we care enough about
back compat for this niche hardware device.

See the rest of the commit message. The patch improves error messages as a side effect, and in my opinion also the code. So it can be considered independent of the original reason why it was developed.

Paolo




reply via email to

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