Commit graph

8 commits

Author SHA1 Message Date
Matthew Maurer
8aabb8d9c0 Update to syn-2
Change-Id: I0043acbdcd7a697063931a3505f6e90354f92d2a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5078521
Commit-Queue: Frederick Mayle <fmayle@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2023-12-02 00:23:50 +00:00
Daniel Verkamp
7666fbc7eb argh_helpers: use fold() to build String from iterator
Rather than constructing a bunch of String objects with format!() and
then concatenating them all with collect() at the end, use fold() and
write!() to append onto a single String instance.

This is suggested by a new Rust 1.73 clippy lint.

<https://rust-lang.github.io/rust-clippy/master/index.html#/format_collect>

Change-Id: If9bcc9fa579228618a7cb6f3602793f2287d97c4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5005519
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-11-06 22:22:50 +00:00
Dennis Kempin
1dab58a2cf Update all copyright headers to match new style
This search/replace updates all copyright notices to drop the
"All rights reserved", Use "ChromiumOS" instead of "Chromium OS"
and drops the trailing dots.

This fulfills the request from legal and unifies our notices.

./tools/health-check has been updated to only accept this style.

BUG=b:246579983
TEST=./tools/health-check

Change-Id: I87a80701dc651f1baf4820e5cc42469d7c5f5bf7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3894243
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-09-13 18:41:29 +00:00
Vikram Auradkar
9ce0b67d80 crosvm: Fix Windows arg parsing
RunCommand and RunMPCommand take same set of arguments so use RunCommand
within RunMPCommand.
- Remove catch all. This will help print better arg parsing error msg
- Use code that splits --key=value into "--key" "value"

BUG=b:239579779
BUG=b:240717724
BUG=b:238361778
Test: presubmit && ran downstream integration tests

Change-Id: I1c3847891dbfe499b34c240656baf0e81bdf1438
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3846055
Auto-Submit: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
Reviewed-by: Richard Zhang <rizhang@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Vikram Auradkar <auradkar@google.com>
2022-08-25 20:31:25 +00:00
Vikram Auradkar
dd7ef550dc crosvm: resync crosvm windows
Brings in changes from downstream.

- Reintroduce generate_catchall_args.
  - This code will be deleted soon
- Fix clippy warnings.
- Conditionally compile feature specific changes.

BUG=b:213146388
TEST=The code compiles downstream.

Change-Id: Ic8192b84f5677d1b5f9b2a2c80df20645b1dfab3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3794523
Auto-Submit: Vikram Auradkar <auradkar@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-07-29 20:56:41 +00:00
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