mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
main: accept -h as an alias for --help
This is a widely-used convention, and it's not very helpful to just print "Unrecognized argument: -h". We won't be able to use -h as a short argument name for anything else, but that seems like a reasonable tradeoff. BUG=b:3739371 TEST=crosvm -h TEST=crosvm run -h Change-Id: I6eef06bfd3cf526e54a6904e5085789566dcc958 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3739372 Reviewed-by: Dennis Kempin <denniskempin@google.com> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
parent
3ccb636365
commit
eb4bfb26e0
1 changed files with 1 additions and 0 deletions
|
@ -425,6 +425,7 @@ fn crosvm_main() -> std::result::Result<CommandStatus, ()> {
|
||||||
eprintln!("Please use `--balloon-bias-mib` instead");
|
eprintln!("Please use `--balloon-bias-mib` instead");
|
||||||
args.push("--balloon-bias-mib".to_string());
|
args.push("--balloon-bias-mib".to_string());
|
||||||
}
|
}
|
||||||
|
"-h" => args.push("--help".to_string()),
|
||||||
arg if arg.starts_with("--") => {
|
arg if arg.starts_with("--") => {
|
||||||
// Split `--arg=val` into `--arg val`, since argh doesn't support the former.
|
// Split `--arg=val` into `--arg val`, since argh doesn't support the former.
|
||||||
if let Some((key, value)) = arg.split_once("=") {
|
if let Some((key, value)) = arg.split_once("=") {
|
||||||
|
|
Loading…
Reference in a new issue