composite disk: no support for multi-file partition
We don't need to support multi-file partition for composite disk images.
This will make the code simpler.
BUG=b:190503456
TEST=cargo test
Change-Id: I9e115ec73ad451ea46fe91c0d0a3c2e85aa1f010
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3058835
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Andrew Walbran <qwandor@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Jooyung Han <jooyung@google.com>
Auto-Submit: Jooyung Han <jooyung@google.com>
diff --git a/src/main.rs b/src/main.rs
index 0da7b8d..fd06ccf 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -37,9 +37,7 @@
use devices::{Ac97Backend, Ac97Parameters};
use disk::QcowFile;
#[cfg(feature = "composite-disk")]
-use disk::{
- create_composite_disk, create_disk_file, ImagePartitionType, PartitionFileInfo, PartitionInfo,
-};
+use disk::{create_composite_disk, create_disk_file, ImagePartitionType, PartitionInfo};
use vm_control::{
client::{
do_modify_battery, do_usb_attach, do_usb_detach, do_usb_list, handle_request, vms_request,
@@ -2358,12 +2356,10 @@
.map_err(|e| error!("Failed to get length of partition image: {}", e))?;
Ok(PartitionInfo {
label: label.to_owned(),
- files: vec![PartitionFileInfo {
- path: Path::new(path).to_owned(),
- size,
- }],
+ path: Path::new(path).to_owned(),
partition_type: ImagePartitionType::LinuxFilesystem,
writable: false,
+ size,
})
} else {
error!(