cli: Add --serial log.file= and log.append=
And for other character devices --console, --parallel, --channel
This commit is contained in:
parent
b08647c2f2
commit
322d212516
|
@ -244,6 +244,7 @@
|
|||
<serial type="tcp">
|
||||
<source mode="bind" host="127.0.0.1" service="2222"/>
|
||||
<protocol type="telnet"/>
|
||||
<log file="/tmp/foo.log" append="on"/>
|
||||
</serial>
|
||||
<parallel type="udp">
|
||||
<source mode="bind" host="127.0.0.1" service="1234"/>
|
||||
|
|
|
@ -490,7 +490,7 @@ c.add_compare(""" \
|
|||
--input type=keyboard,bus=usb \
|
||||
--input tablet \
|
||||
\
|
||||
--serial tcp,host=:2222,mode=bind,protocol=telnet \
|
||||
--serial tcp,host=:2222,mode=bind,protocol=telnet,log_file=/tmp/foo.log,log_append=yes \
|
||||
--parallel udp,host=0.0.0.0:1234,bind_host=127.0.0.1:1234 \
|
||||
--parallel unix,path=/tmp/foo-socket \
|
||||
--channel pty,target_type=guestfwd,target_address=127.0.0.1:10000 \
|
||||
|
|
|
@ -2370,6 +2370,8 @@ _ParserChar.add_arg(None, "host", cb=_ParserChar.set_host_cb)
|
|||
_ParserChar.add_arg(None, "bind_host", cb=_ParserChar.set_bind_cb)
|
||||
_ParserChar.add_arg(None, "target_address", cb=_ParserChar.set_target_cb)
|
||||
_ParserChar.add_arg("source_mode", "mode")
|
||||
_ParserChar.add_arg("log_file", "log.file")
|
||||
_ParserChar.add_arg("log_append", "log.append", is_onoff=True)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -281,6 +281,9 @@ class _VirtualCharDevice(VirtualDevice):
|
|||
doc=_("Sysfs name of virtio port in the guest"),
|
||||
default_cb=_default_target_name)
|
||||
|
||||
log_file = XMLProperty("./log/@file")
|
||||
log_append = XMLProperty("./log/@append", is_onoff=True)
|
||||
|
||||
|
||||
class VirtualConsoleDevice(_VirtualCharDevice):
|
||||
virtual_device_type = "console"
|
||||
|
|
Loading…
Reference in New Issue