summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJorge E. Moreira <jemoreira@google.com>2019-05-17 13:57:04 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-05-22 20:57:00 -0700
commit9c9e0e71bd0ecf770fca66320a4b3b8a0b329bd4 (patch)
tree46523fb853222732a0b476b9370e2afe433d3b3d /src/main.rs
parent3007ff3cf408f9e6a2e0731a4fa7d6f8f65dfa47 (diff)
downloadcrosvm-9c9e0e71bd0ecf770fca66320a4b3b8a0b329bd4.tar
crosvm-9c9e0e71bd0ecf770fca66320a4b3b8a0b329bd4.tar.gz
crosvm-9c9e0e71bd0ecf770fca66320a4b3b8a0b329bd4.tar.bz2
crosvm-9c9e0e71bd0ecf770fca66320a4b3b8a0b329bd4.tar.lz
crosvm-9c9e0e71bd0ecf770fca66320a4b3b8a0b329bd4.tar.xz
crosvm-9c9e0e71bd0ecf770fca66320a4b3b8a0b329bd4.tar.zst
crosvm-9c9e0e71bd0ecf770fca66320a4b3b8a0b329bd4.zip
crosvm: Implement the file type for serial ports
BUG=chromium:953983

Change-Id: I0c1dc6216ebfdb61db85d3d9665f88f7231d99c8
Reviewed-on: https://chromium-review.googlesource.com/1618281
Commit-Ready: Jorge Moreira Broche <jemoreira@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 6b948e6..092664a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -267,6 +267,7 @@ fn parse_serial_options(s: &str) -> argument::Result<SerialParameters> {
                     ))
                 })?
             }
+            "path" => serial_setting.path = Some(PathBuf::from(v)),
             _ => {
                 return Err(argument::Error::UnknownArgument(format!(
                     "serial parameter {}",
@@ -796,8 +797,9 @@ fn run_vm(args: std::env::Args) -> std::result::Result<(), ()> {
                           "type=TYPE,[path=PATH,num=NUM,console]",
                           "Comma seperated key=value pairs for setting up serial devices. Can be given more than once.
                           Possible key values:
-                          type=(stdout,syslog,sink) - Where to route the serial device
+                          type=(stdout,syslog,sink,file) - Where to route the serial device
                           num=(1,2,3,4) - Serial Device Number
+                          path=PATH - The path to the file to write to when type=file
                           console - Use this serial device as the guest console. Can only be given once. Will default to first serial port if not provided.
                           "),
           Argument::value("syslog-tag", "TAG", "When logging to syslog, use the provided tag."),