aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2022-02-18 15:55:50 +0100
committerMarkus Armbruster <armbru@redhat.com>2022-02-28 11:39:35 +0100
commitbbe0342b2a9b3232282dbaa2080763654e51870b (patch)
tree72c1fc17320f0b923baa5ae9479fe262d470628a
parent90254ec46dbf9c844f913a23c88ee24fb969c49b (diff)
downloadqemu-bbe0342b2a9b3232282dbaa2080763654e51870b.zip
qemu-bbe0342b2a9b3232282dbaa2080763654e51870b.tar.gz
qemu-bbe0342b2a9b3232282dbaa2080763654e51870b.tar.bz2
keyval: Fix grammar comment to cover downstream prefix
According to the grammar, a key __com.redhat_foo would be parsed as two key fragments __com and redhat_foo. It's actually parsed as a single fragment. Fix the grammar. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20220218145551.892787-2-armbru@redhat.com>
-rw-r--r--util/keyval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/keyval.c b/util/keyval.c
index 904337c..0cf2e84 100644
--- a/util/keyval.c
+++ b/util/keyval.c
@@ -16,7 +16,9 @@
* key-vals = [ key-val { ',' key-val } [ ',' ] ]
* key-val = key '=' val | help
* key = key-fragment { '.' key-fragment }
- * key-fragment = / [^=,.]+ /
+ * key-fragment = qapi-name | index
+ * qapi-name = '__' / [a-z0-9.-]+ / '_' / [A-Za-z][A-Za-z0-9_-]* /
+ * index = / [0-9]+ /
* val = { / [^,]+ / | ',,' }
* help = 'help' | '?'
*