Commit graph

3 commits

Author SHA1 Message Date
Anton Romanov
7910b89eb3 crosvm: move run command to argh
Due to the way we allow arguments to be specified I was not able to
reuse Config structure for cmdline arguments. (eg we allow multiple ways
to specify same config)

There is still some usage of arguments mod that we need to cleanup
later.

Change-Id: Ia0c12d508d0a10d17f58944de71276e5984d69ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3684144
Auto-Submit: Anton Romanov <romanton@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Anton Romanov <romanton@google.com>
2022-06-13 23:55:20 +00:00
Anton Romanov
33adade230 crosvm: arghify top-level cmdline options
Change-Id: I8e31f8fb56ed0a4bc83f9eec7fdffd2bdf072c89
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3671861
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Anton Romanov <romanton@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-02 21:34:01 +00:00
Anton Romanov
01a9386cde crosvm: argh-ify device command
Example help output (note that in main crosvm device help is broken)
```
Usage: crosvm device <command> [<args>]

Devices

Options:
  --help            display usage information

Commands:
  block             Block device
  net               Net device
  console           Console device
  fs                FS Device
  gpu               GPU device
  vsock             Vsock device
  wl                Wayland device
```
crosvm device wl help:
```
Usage: crosvm device wl --socket <PATH> --vm-socket <PATH> [--wayland-sock <PATH[,name=NAME]...>] [--resource-bridge <PATH>]

Wayland device

Options:
  --socket          path to bind a listening vhost-user socket
  --vm-socket       path to a socket for wayland-specific messages
  --wayland-sock    path to one or more Wayland sockets. The unnamed socket is
                    used for displaying virtual screens while the named ones are
                    used for IPC
  --resource-bridge path to the GPU resource bridge
  --help            display usage information
```

Change-Id: Ie976b5545644c10b24cb3cdfcb17b213641064f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3668920
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Anton Romanov <romanton@google.com>
2022-06-02 19:21:36 +00:00