diff options
author | Zach Reizner <zachr@google.com> | 2018-04-24 15:58:07 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-04-26 17:00:37 -0700 |
commit | 28be0c6812d62b54a3974dc55d8d83f34499298e (patch) | |
tree | 9880bf02163e31e41ee7996e2118738d626d4469 /src/plugin/mod.rs | |
parent | da3f64c8fe01dae1eaf1e1fc192dfcd711dc1dbe (diff) | |
download | crosvm-28be0c6812d62b54a3974dc55d8d83f34499298e.tar crosvm-28be0c6812d62b54a3974dc55d8d83f34499298e.tar.gz crosvm-28be0c6812d62b54a3974dc55d8d83f34499298e.tar.bz2 crosvm-28be0c6812d62b54a3974dc55d8d83f34499298e.tar.lz crosvm-28be0c6812d62b54a3974dc55d8d83f34499298e.tar.xz crosvm-28be0c6812d62b54a3974dc55d8d83f34499298e.tar.zst crosvm-28be0c6812d62b54a3974dc55d8d83f34499298e.zip |
crosvm/plugin: fmt plugin module and remove negative error code
This is fixes the last remaining negative error code returned by a Rust function. TEST= cargo test --features plugin BUG=None Change-Id: Ideee89b0f0b1effecc9b5880bcf400c82d9b96f9 Reviewed-on: https://chromium-review.googlesource.com/1026938 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Diffstat (limited to 'src/plugin/mod.rs')
-rw-r--r-- | src/plugin/mod.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugin/mod.rs b/src/plugin/mod.rs index 85a0266..6a22494 100644 --- a/src/plugin/mod.rs +++ b/src/plugin/mod.rs @@ -332,8 +332,7 @@ pub fn run_vcpus(kvm: &Kvm, } // We do not really want the signal handler to run... - block_signal(SIGRTMIN() + 0) - .expect("failed to block signal"); + block_signal(SIGRTMIN() + 0).expect("failed to block signal"); // Tell KVM to not block anything when entering kvm run // because we will be using first RT signal to kick the VCPU. vcpu.set_signal_mask(&[]) @@ -386,8 +385,7 @@ pub fn run_vcpus(kvm: &Kvm, // Try to clear the signal that we use to kick VCPU if it is // pending before attempting to handle pause requests. - clear_signal(SIGRTMIN() + 0) - .expect("failed to clear pending signal"); + clear_signal(SIGRTMIN() + 0).expect("failed to clear pending signal"); if let Err(e) = vcpu_plugin.pre_run(&vcpu) { error!("failed to process pause on vcpu {}: {:?}", cpu_id, e); @@ -443,8 +441,7 @@ pub fn run_config(cfg: Config) -> Result<()> { if let Some(mac_address) = cfg.mac_address { let tap = Tap::new(false).map_err(Error::TapOpen)?; tap.set_ip_addr(host_ip).map_err(Error::TapSetIp)?; - tap.set_netmask(netmask) - .map_err(Error::TapSetNetmask)?; + tap.set_netmask(netmask).map_err(Error::TapSetNetmask)?; tap.set_mac_address(mac_address) .map_err(Error::TapSetMacAddress)?; |