[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] '.' IDs and certain names breaks -global and -set
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] '.' IDs and certain names breaks -global and -set |
Date: |
Wed, 09 Apr 2014 11:56:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
We have a number of device model names containing '.'. They're unusable
with -global. That's because "-global A.B.C=foo" gets parsed as
driver = "A"
property = "B.C"
value = "foo".
Wrong when the device model name is really A.B and the property is C,
e.g. "-global cfi.pflash01.name".
Related problem: QemuOpts ID may contain '.'. Such IDs are in fact
common practice. Unfortunately, they're unusable with -set. For
instance, -set A.B.C.D=foo gets parsed as
group = "A"
id = "B"
arg = "C.D"
value = "foo"
Wrong when the id is really B.C and the arg is D, e.g. "-device
isa-serial,id=s.0 -set device.s.0.chardev=c0". This issue isn't limited
to devices.
Related historical problem: commit b560a9a.
Possible solutions:
* Outlaw '.' in QemuOpts parameter names (and thus device model names
and property names, because QemuOpts is a major way for users to
specify them).
* Resolve the syntactic ambiguity semantically (ugh)
* Extend the syntax of -global and -set to let users avoid the issue, or
replace them outright
* Use the old ostrich algorithm
Andreas, what restrictions does QOM place on QOM path component names?
No '/', obviously. Anything else?
- [Qemu-devel] '.' IDs and certain names breaks -global and -set,
Markus Armbruster <=