Skip to contentSkip to conversation

Minor doc fixes

PATCH In review Markus Armbruster 2 participants 5 messages Feb 18, 2022 – Feb 25, 2022

lore
Share & tools
lore
#0 lore raw

cover Minor doc fixes

Markus Armbruster (2):
keyval: Fix grammar comment to cover downstream prefix
qapi: Fix stale reference to scripts/qapi.py in a comment

 qapi/qapi-util.c | 2 +-
 util/keyval.c    | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
2.35.1
#1 lore raw

PATCH 1/2 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.

---
 util/keyval.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
util/keyval.c +3 -1
index 904337c8a1..0cf2e84dc8 100644
@@ -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' | '?'
  *
Signature · 1 line
2.35.1
#2 lore raw

PATCH 2/2 qapi: Fix stale reference to scripts/qapi.py in a comment

In reply to Markus Armbruster
---
 qapi/qapi-util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
qapi/qapi-util.c +1 -1
index fda7044539..63596e11c5 100644
@@ -113,7 +113,7 @@ bool qapi_bool_parse(const char *name, const char *value, bool *obj, Error **err
  * may contain only letters, digits, hyphen and period.
  * The special exception for enumeration names is not implemented.
  * See docs/devel/qapi-code-gen.txt for more on QAPI naming rules.
- * Keep this consistent with scripts/qapi.py!
+ * Keep this consistent with scripts/qapi-gen.py!
  * If @complete, the parse fails unless it consumes @str completely.
  * Return its length on success, -1 on failure.
  */
Signature · 1 line
2.35.1