mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
crosvm: add cmdline option wait on balloon adjust response
Change-Id: Iae2bde20e9e68d9a40a40526da4553ee9b7cc312 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5255763 Commit-Queue: Frederick Mayle <fmayle@google.com> Reviewed-by: David Stevens <stevensd@chromium.org>
This commit is contained in:
parent
62a3fb4be7
commit
f35dc67e13
2 changed files with 4 additions and 1 deletions
|
@ -176,6 +176,9 @@ pub struct BalloonCommand {
|
|||
#[argh(positional, arg_name = "VM_SOCKET")]
|
||||
/// VM Socket path
|
||||
pub socket_path: String,
|
||||
/// wait for response
|
||||
#[argh(switch)]
|
||||
pub wait: bool,
|
||||
}
|
||||
|
||||
#[derive(argh::FromArgs)]
|
||||
|
|
|
@ -230,7 +230,7 @@ fn inject_gpe(cmd: cmdline::GpeCommand) -> std::result::Result<(), ()> {
|
|||
fn balloon_vms(cmd: cmdline::BalloonCommand) -> std::result::Result<(), ()> {
|
||||
let command = BalloonControlCommand::Adjust {
|
||||
num_bytes: cmd.num_bytes,
|
||||
wait_for_success: false,
|
||||
wait_for_success: cmd.wait,
|
||||
};
|
||||
vms_request(&VmRequest::BalloonCommand(command), cmd.socket_path)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue