libs: Move cstr!() into its own crate
Make the macro host_supported, for unittests.
This overshadows the homonymous crate from crates.io [1] but importing
and depending on an external crate for <10 lines of code seems overkill.
[1]: https://crates.io/crates/cstr
Bug: 308694211
Test: atest libcstr.tests
Test: m libcstr
Test: m pvmfw_bin rialto_bin vmbase_example_bin
Change-Id: If1bf37034fc004a380b3ba528b9d76393a865d3e
diff --git a/pvmfw/src/dice.rs b/pvmfw/src/dice.rs
index cc31f34..112c24c 100644
--- a/pvmfw/src/dice.rs
+++ b/pvmfw/src/dice.rs
@@ -17,12 +17,12 @@
use core::ffi::c_void;
use core::mem::size_of;
use core::slice;
+use cstr::cstr;
use diced_open_dice::{
bcc_format_config_descriptor, bcc_handover_main_flow, hash, Config, DiceConfigValues, DiceMode,
Hash, InputValues, HIDDEN_SIZE,
};
use pvmfw_avb::{DebugLevel, Digest, VerifiedBootData};
-use vmbase::cstr;
use vmbase::memory::flushed_zeroize;
fn to_dice_mode(debug_level: DebugLevel) -> DiceMode {