summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-03-31 09:39:11 +0000
committerAlyssa Ross <hi@alyssa.is>2020-06-15 09:37:25 +0000
commita201fd46bd0549655b85bcd6e609fdabd1add837 (patch)
tree1f51d7e5e54fb7f715cdcc45451ff114ab597f94 /src/main.rs
parent89f45363b3c902edaa137e5bc0ada605c604d854 (diff)
downloadcrosvm-a201fd46bd0549655b85bcd6e609fdabd1add837.tar
crosvm-a201fd46bd0549655b85bcd6e609fdabd1add837.tar.gz
crosvm-a201fd46bd0549655b85bcd6e609fdabd1add837.tar.bz2
crosvm-a201fd46bd0549655b85bcd6e609fdabd1add837.tar.lz
crosvm-a201fd46bd0549655b85bcd6e609fdabd1add837.tar.xz
crosvm-a201fd46bd0549655b85bcd6e609fdabd1add837.tar.zst
crosvm-a201fd46bd0549655b85bcd6e609fdabd1add837.zip
make remote wayland device optional
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 36f3881..7ea2e01 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -871,6 +871,15 @@ fn set_argument(cfg: &mut Config, name: &str, value: Option<&str>) -> argument::
             }
             cfg.wayland_socket_paths.insert(name.to_string(), path);
         }
+        "wayland-device-sock" => {
+            let path = PathBuf::from(value.unwrap());
+            if cfg.remote_wayland_device_socket_path.is_some() {
+                return Err(argument::Error::TooManyArguments(String::from(
+                    "wayland device socket already supplied",
+                )));
+            }
+            cfg.remote_wayland_device_socket_path = Some(path);
+        }
         #[cfg(feature = "wl-dmabuf")]
         "wayland-dmabuf" => cfg.wayland_dmabuf = true,
         "x-display" => {
@@ -1446,9 +1455,7 @@ Possible key values:
         Argument::value("x-display", "DISPLAY", "X11 display name to use."),
         Argument::flag(
             "display-window-keyboard",
-            "\
-Capture keyboard input from the display window.
-",
+            "Capture keyboard input from the display window.",
         ),
         Argument::flag(
             "display-window-mouse",
@@ -1470,6 +1477,11 @@ Path to the Wayland socket to use.  The unnamed one is used for displaying
 virtual screens.  Named ones are only for IPC.
 ",
         ),
+        Argument::value(
+            "wayland-device-sock",
+            "PATH",
+            "Path to a remote crosvm Wayland device to use.",
+        ),
         #[cfg(feature = "wl-dmabuf")]
         Argument::flag(
             "wayland-dmabuf",