summary refs log tree commit diff stats
path: root/monitor/monitor-internal.h
diff options
context:
space:
mode:
authorStefan Reiter <s.reiter@proxmox.com>2022-02-25 09:49:47 +0100
committerDr. David Alan Gilbert <dgilbert@redhat.com>2022-03-02 18:12:40 +0000
commit26fcd766179e8a27c4c6c702201bdb0fe60eb091 (patch)
treeb9cc26900c7d9ff62af57dbdf425d759ed78406f /monitor/monitor-internal.h
parent4ce7a08d3e3a869f89c2af622fa77e967ade7cbf (diff)
downloadfocaccia-qemu-26fcd766179e8a27c4c6c702201bdb0fe60eb091.tar.gz
focaccia-qemu-26fcd766179e8a27c4c6c702201bdb0fe60eb091.zip
monitor/hmp: add support for flag argument with value
Adds support for the "-xs" parameter type, where "-x" denotes a flag
name and the "s" suffix indicates that this flag is supposed to take
an arbitrary string parameter.

These parameters are always optional, the entry in the qdict will be
omitted if the flag is not given.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
[FE: fixed typo pointed out by Eric Blake
     use s instead of V to indicate string parameter]
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Message-Id: <20220225084949.35746-2-f.ebner@proxmox.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'monitor/monitor-internal.h')
-rw-r--r--monitor/monitor-internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/monitor/monitor-internal.h b/monitor/monitor-internal.h
index 3da3f86c6a..caa2e90ef2 100644
--- a/monitor/monitor-internal.h
+++ b/monitor/monitor-internal.h
@@ -63,7 +63,8 @@
  * '.'          other form of optional type (for 'i' and 'l')
  * 'b'          boolean
  *              user mode accepts "on" or "off"
- * '-'          optional parameter (eg. '-f')
+ * '-'          optional parameter (eg. '-f'); if followed by a 's', it
+ *              specifies an optional string param (e.g. '-fs' allows '-f foo')
  *
  */