Commit graph

9 commits

Author SHA1 Message Date
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
Dennis Kempin
4fea399df9 Reformat imports
crosvm is switching the import style to use one import per line.
While more verbose, this will greatly reduce the occurence of merge
conflicts going forward.

Note: This is using a nightly feature of rustfmt. So it's a one-off
re-format only. We are considering adding a nightly toolchain to
enable the feature permanently.

BUG=b:239937122
TEST=CQ

Change-Id: Id2dd4dbdc0adfc4f8f3dd1d09da1daafa2a39992
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3784345
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-07-28 00:15:50 +00:00
Daniel Verkamp
a5884b5a6e kernel_cmdline: convert to ThisError and sort
BUG=b:197143586
TEST=cargo check

Change-Id: Ic86f0d08b36e5f1b30ea35def38e3875c972c938
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3105081
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2021-09-02 21:00:23 +00:00
Daniel Verkamp
2924f8bfb7 kernel_cmdline, cros_async: impl From instead of Into
As recommended by the clippy from_over_into warning, allow conversion to
Vec<u8> by adding a more flexible From impl instead of Into.

https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into

BUG=None
TEST=bin/clippy

Change-Id: Iaa6455b11629846e5ce9bc9be4a6cae0baf87d5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2862580
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2021-05-06 22:06:50 +00:00
Daniel Verkamp
c26d20b6e6 Fix new clippy warning for potential matches! uses
Replace uses of match where the branches just return true or false
depending on a single match with the matches! macro, as checked by
clippy:
https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro

BUG=None
TEST=bin/clippy # with cargo 1.47.0 / clippy 0.0.212

Change-Id: I9f18ef8ccb45dacc2c4e2a113afd0b5a2d2e3580
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2519842
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
2020-11-05 06:27:17 +00:00
Dylan Reid
c3bee1f8c3 tree-wide: update to new inclusive range syntax
1.38 nightly started warning about using `...` vs `..=`, update to avoid
the warning.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Change-Id: Ibc3d24c5410b6eed9a1207db21e529ec6a763376
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1715575
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2019-07-24 02:22:21 +00:00
David Tolnay
c69f97542a error: Consistently use Display instead of error description()
The description method is deprecated and its signature forces less
helpful error messages than what Display can provide.

BUG=none
TEST=cargo check --all-features
TEST=cargo check --target aarch64-unknown-linux-gnu

Change-Id: I27fc99d59d0ef457c5273dc53e4c563ef439c2c0
Reviewed-on: https://chromium-review.googlesource.com/1497735
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2019-03-02 17:41:31 -08:00
Zach Reizner
55a9e504be cargo fmt all source code
Now that cargo fmt has landed, run it over everything at once to bring
rust source to the standard formatting.

TEST=cargo test
BUG=None

Change-Id: Ic95a48725e5a40dcbd33ba6d5aef2bd01e91865b
Reviewed-on: https://chromium-review.googlesource.com/1259287
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2018-10-09 21:14:05 -07:00
Sonny Rao
6cc352f4fa crosvm: move kernel_cmdline to it's own crate
We'll want architecture code to be able to supply and manipulate Linux
kernel command lines, so let's move this out to it's own crate and
export the interfaces.

BUG=chromium:797868
TEST=./build_test passes on all architectures
TEST=crosvm runs on caroline

Change-Id: I94904055ac02582a4f4d8bbb54d0f41ed14b955d
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/898351
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2018-02-02 23:53:42 -08:00