mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: qcow_sync: Add Debug impl for QcowDiskSync
The new composable traits require Debug. Implement it manually since QcowMetadata contains RwLock state that cannot auto derive. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
dac8707c35
commit
ad789024f9
@@ -7,7 +7,7 @@ use std::collections::VecDeque;
|
||||
use std::fs::File;
|
||||
use std::os::fd::{AsFd, AsRawFd, BorrowedFd, OwnedFd, RawFd};
|
||||
use std::sync::Arc;
|
||||
use std::{io, ptr, slice};
|
||||
use std::{fmt, io, ptr, slice};
|
||||
|
||||
use vmm_sys_util::eventfd::EventFd;
|
||||
use vmm_sys_util::write_zeroes::{PunchHole, WriteZeroesAt};
|
||||
@@ -180,6 +180,15 @@ pub struct QcowDiskSync {
|
||||
data_raw_file: QcowRawFile,
|
||||
}
|
||||
|
||||
impl fmt::Debug for QcowDiskSync {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("QcowDiskSync")
|
||||
.field("sparse", &self.sparse)
|
||||
.field("has_backing", &self.backing_file.is_some())
|
||||
.finish_non_exhaustive()
|
||||
}
|
||||
}
|
||||
|
||||
impl QcowDiskSync {
|
||||
pub fn new(
|
||||
file: File,
|
||||
|
||||
Reference in New Issue
Block a user