From 36bb092978eb90dcfd39bce5ed7794a7c91e73ae Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Thu, 3 Nov 2022 14:56:13 -0700 Subject: [PATCH] qcow_utils: add qcow feature to Cargo.toml When the qcow2 support was moved behind a Cargo feature flag (--features=qcow), the qcow_utils crate had some of its code modified to check for `#[cfg(feature = "qcow")]`, but this feature was not actually present in its Cargo.toml file, so enabling it had no effect. This can be verified by checking the libqcow_utils.so contains a create_qcow_with_size() function that does more than just return -EINVAL. BUG=None TEST=emerge-brya crosvm # verify libqcow_utils.so via disassembly Fixes: 8847de27256a ("qcow: Turn QCOW support into a feature") Change-Id: I9416908c97d770a6e75324626124af482e6473b2 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4004348 Reviewed-by: Dennis Kempin Reviewed-by: Christian Blichmann Commit-Queue: Christian Blichmann --- qcow_utils/Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qcow_utils/Cargo.toml b/qcow_utils/Cargo.toml index 38cad07123..1cea6f396b 100644 --- a/qcow_utils/Cargo.toml +++ b/qcow_utils/Cargo.toml @@ -8,6 +8,10 @@ edition = "2021" path = "src/qcow_utils.rs" crate-type = ["cdylib"] +[features] +default = ["qcow"] +qcow = [] + [dependencies] libc = "*" disk = { path = "../disk" }