summaryrefslogtreecommitdiff
path: root/qapi-schema.json
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2013-06-08 23:25:08 +0200
committerPeter Wu <lekensteyn@gmail.com>2013-06-08 23:34:14 +0200
commitb8f9d44cfd94c2ae4a810f3469d08da120424ffc (patch)
tree5e636b69812b5b28a4d4d9641b89cd5dc31389c9 /qapi-schema.json
parent7387de16d0e4d2988df350926537cd12a8e34206 (diff)
downloadqemu-b8f9d44cfd94c2ae4a810f3469d08da120424ffc.tar.gz
chardev: add baud parameter for serial host deviceserial-baud
When QEMU starts, it always changes the serial port parameters including baud rate. This confused my guest which thought it was outputting at 9600 baud while it was in fact changed to 115200. After this patch, I can use `-serial /dev/ttyS0,baud=9600` to override the default baud rate of 115200. Documentation is updated as well, so that users know about the new `baud` parameter for `-serial` and `-chardev serial` (and its alias `-chardev tty`). Note that the baud option is not implemented for Windows. QEMU does not change the default baud rate on Windows anyway. If somebody is going to implement it, do not forget to update the documentation on "COM" devices which is also of backend serial. Signed-off-by: Peter Wu <lekensteyn@gmail.com>
Diffstat (limited to 'qapi-schema.json')
-rw-r--r--qapi-schema.json18
1 files changed, 16 insertions, 2 deletions
diff --git a/qapi-schema.json b/qapi-schema.json
index 5ad6894738..f76bc0c2fb 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3186,7 +3186,7 @@
# Configuration info for device and pipe chardevs.
#
# @device: The name of the special file for the device,
-# i.e. /dev/ttyS0 on Unix or COM1: on Windows
+# i.e. /dev/parport0 on Unix.
# @type: What kind of device this is.
#
# Since: 1.4
@@ -3194,6 +3194,20 @@
{ 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
##
+# @ChardevSerial
+#
+# Configuration info for serial chardevs.
+#
+# @device: The name of the special file for the device,
+# i.e. /dev/ttyS0 on Unix or COM1: on Windows
+# @baud: #optional baud rate to set for host device. (default 115200)
+#
+# Since: 1.5
+##
+{ 'type': 'ChardevSerial', 'data': { 'device' : 'str',
+ '*baud': 'int' } }
+
+##
# @ChardevSocket:
#
# Configuration info for (stream) socket chardevs.
@@ -3311,7 +3325,7 @@
{ 'type': 'ChardevDummy', 'data': { } }
{ 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
- 'serial' : 'ChardevHostdev',
+ 'serial' : 'ChardevSerial',
'parallel': 'ChardevHostdev',
'pipe' : 'ChardevHostdev',
'socket' : 'ChardevSocket',