Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
Signed-off-by: Ziy1-Tan <[email protected]>
  • Loading branch information
Ziy1-Tan committed Oct 16, 2024
1 parent 78bb4ce commit b017ce8
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion vmm/sandbox/src/cloud_hypervisor/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ use std::{
use anyhow::anyhow;
use api_client::{simple_api_command, simple_api_full_command_with_fds_and_response};
use containerd_sandbox::error::Result;
use tokio::task::spawn_blocking;
use log::{debug, error, trace};
use tokio::task::spawn_blocking;

use crate::{
cloud_hypervisor::devices::{block::DiskConfig, AddDeviceResponse, RemoveDeviceRequest},
Expand Down
2 changes: 1 addition & 1 deletion vmm/sandbox/src/network/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use std::{
use anyhow::anyhow;
use containerd_sandbox::error::Result;
use futures_util::TryStreamExt;
use log::{debug, error, info, warn};
use nix::{
fcntl::OFlag,
sched::{setns, CloneFlags},
Expand All @@ -31,7 +32,6 @@ use nix::{
use rtnetlink::{new_connection, Handle, IpVersion};
use serde_derive::{Deserialize, Serialize};
use tokio::task::spawn_blocking;
use log::{debug, error, info, warn};

pub use crate::network::{address::IpNet, link::NetworkInterface, route::Route};
use crate::{network::link::LinkType, sandbox::KuasarSandbox, utils::safe_open_file, vm::VM};
Expand Down
2 changes: 1 addition & 1 deletion vmm/sandbox/src/qemu/devices/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.

use async_trait::async_trait;
use containerd_sandbox::error::Result;
use log::{debug, error};
use qapi::{
qmp::{
blockdev_add, blockdev_del, device_add, BlockdevOptions, BlockdevOptionsBase,
Expand All @@ -25,7 +26,6 @@ use qapi::{
};
use sandbox_derive::CmdLineParams;
use serde_json::Value;
use log::{debug, error};

use crate::{
device::{BusType, Device, Transport},
Expand Down
2 changes: 1 addition & 1 deletion vmm/sandbox/src/qemu/devices/char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ limitations under the License.
use anyhow::anyhow;
use async_trait::async_trait;
use containerd_sandbox::error::Result;
use log::{debug, error};
use qapi::{
qmp::{chardev_add, chardev_remove, device_add, ChardevBackend, ChardevCommon, ChardevHostdev},
Dictionary,
};
use sandbox_derive::CmdLineParams;
use serde_json::Value;
use log::{debug, error};

use crate::{
device::{BusType, CharBackendType},
Expand Down
2 changes: 1 addition & 1 deletion vmm/sandbox/src/qemu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use anyhow::anyhow;
use async_trait::async_trait;
use containerd_sandbox::error::{Error, Result};
use futures_util::TryFutureExt;
use log::{debug, error, trace, warn};
use nix::{fcntl::OFlag, libc::kill, sys::stat::Mode};
use qapi::qmp::quit;
use serde::{Deserialize, Serialize};
Expand All @@ -37,7 +38,6 @@ use tokio::{
task::spawn_blocking,
time::sleep,
};
use log::{debug, error, trace, warn};
use unshare::Fd;

use crate::{
Expand Down
2 changes: 1 addition & 1 deletion vmm/sandbox/src/qemu/qmp_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use std::sync::Arc;
use anyhow::anyhow;
use containerd_sandbox::error::Result;
use futures_util::StreamExt;
use log::error;
use qapi::{
futures::{QapiService, QmpStreamTokio},
qmp::{device_del, Event, QmpCommand},
Expand All @@ -31,7 +32,6 @@ use tokio::{
Mutex,
},
};
use log::error;

pub struct QmpClient {
qmp: QapiService<QmpStreamTokio<WriteHalf<UnixStream>>>,
Expand Down
2 changes: 1 addition & 1 deletion vmm/sandbox/src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ use containerd_sandbox::{
spec::Mount,
};
use containerd_shim::mount::mount_rootfs;
use nix::libc::MNT_DETACH;
use log::debug;
use nix::libc::MNT_DETACH;
pub use utils::*;
use vmm_common::{
mount::{bind_mount, unmount, MNT_NOFOLLOW},
Expand Down
2 changes: 1 addition & 1 deletion vmm/sandbox/src/stratovirt/devices/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.

use async_trait::async_trait;
use containerd_sandbox::error::Result;
use log::{debug, error};
use qapi::{
qmp::{
blockdev_add, blockdev_del, device_add, BlockdevCacheOptions, BlockdevOptions,
Expand All @@ -26,7 +27,6 @@ use qapi::{
};
use sandbox_derive::CmdLineParams;
use serde_json::Value;
use log::{debug, error};

use crate::{
device::Device,
Expand Down
2 changes: 1 addition & 1 deletion vmm/sandbox/src/stratovirt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use anyhow::anyhow;
use async_trait::async_trait;
use containerd_sandbox::error::{Error, Result};
use futures_util::TryFutureExt;
use log::{debug, error, trace, warn};
use nix::{fcntl::OFlag, libc::kill, sys::stat::Mode};
use qapi::qmp::quit;
use qmp::CpuInfo;
Expand All @@ -38,7 +39,6 @@ use tokio::{
task::spawn_blocking,
time::sleep,
};
use log::{debug, error, trace, warn};
use unshare::Fd;

use self::devices::{pcie_rootbus::PcieRootBus, rootport::RootPort, PCIE_ROOTBUS_CAPACITY};
Expand Down
2 changes: 1 addition & 1 deletion vmm/sandbox/src/stratovirt/qmp_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use std::sync::Arc;
use anyhow::anyhow;
use containerd_sandbox::error::Result;
use futures_util::StreamExt;
use log::error;
use qapi::{
futures::{QapiService, QmpStreamTokio},
qmp::{device_del, Event, QmpCommand},
Expand All @@ -31,7 +32,6 @@ use tokio::{
Mutex,
},
};
use log::error;

pub struct QmpClient {
qmp: QapiService<QmpStreamTokio<WriteHalf<UnixStream>>>,
Expand Down
2 changes: 1 addition & 1 deletion vmm/sandbox/src/stratovirt/virtiofs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ limitations under the License.
use std::process::Stdio;

use anyhow::{anyhow, Result};
use log::{debug, error};
use sandbox_derive::CmdLineParamSet;
use serde::{Deserialize, Serialize};
use time::OffsetDateTime;
use tokio::{process::Child, sync::watch::Sender, task::JoinHandle};
use log::{debug, error};

use crate::{
param::ToCmdLineParams,
Expand Down

0 comments on commit b017ce8

Please sign in to comment.