diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 04f0cfd8..339cb9fe 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -816,7 +816,7 @@ dependencies = [ "lazy_static", "openssl", "openssl-sys", - "pv", + "pv_core", "rand", "regex", "serde", diff --git a/rust/pvapconfig/Cargo.toml b/rust/pvapconfig/Cargo.toml index 1d617821..ce3bf8d8 100644 --- a/rust/pvapconfig/Cargo.toml +++ b/rust/pvapconfig/Cargo.toml @@ -11,7 +11,7 @@ clap = { version ="4.1", features = ["derive", "wrap_help"]} lazy_static = "1.1" openssl = { version = "0.10" } openssl-sys = { version = "0.9" } -pv = { path = "../pv" } +pv_core = { path = "../pv_core"} rand = "0.8" regex = "1" serde = { version = "1.0", features = ["derive"] } diff --git a/rust/pvapconfig/src/ap.rs b/rust/pvapconfig/src/ap.rs index 0b882359..89846113 100644 --- a/rust/pvapconfig/src/ap.rs +++ b/rust/pvapconfig/src/ap.rs @@ -368,7 +368,7 @@ impl ApqnList { 'P' => ApqnMode::Ep11, _ => panic!("Code inconsistence between regex RE_CARD_TYPE and evaluation code."), }; - if pv::misc::pv_guest_bit_set() { + if pv_core::misc::pv_guest_bit_set() { // the UV blocks requests to CCA cards within SE guest with // AP pass-through support. However, filter out CCA cards as these // cards cause hangs during information gathering. @@ -401,7 +401,7 @@ impl ApqnList { // is not bound, temporarily bind it here until the info has // been retrieved. let mut tempbound = false; - if pv::misc::pv_guest_bit_set() { + if pv_core::misc::pv_guest_bit_set() { let cbs = match get_apqn_bind_state(card, dom) { Ok(bs) => bs, Err(err) => { @@ -748,7 +748,7 @@ mod tests { // if we are inside a secure execution guest the // apsb check should succeed. Outside an SE guest // the check should fail. - if pv::misc::pv_guest_bit_set() { + if pv_core::misc::pv_guest_bit_set() { assert!(ap_bus_has_apsb_support().is_ok()); } else { assert!(ap_bus_has_apsb_support().is_err()); diff --git a/rust/pvapconfig/src/main.rs b/rust/pvapconfig/src/main.rs index 07899cd9..170c9142 100644 --- a/rust/pvapconfig/src/main.rs +++ b/rust/pvapconfig/src/main.rs @@ -16,7 +16,7 @@ use ap::{Apqn, ApqnList}; use cli::ARGS; use config::{ApConfigEntry, ApConfigList}; use helper::{LockFile, PATH_PVAPCONFIG_LOCK}; -use pv::uv::{ListableSecretType, SecretList}; +use pv_core::uv::{ListableSecretType, SecretList}; use std::process::ExitCode; use utils::release_string; @@ -81,7 +81,7 @@ fn main() -> ExitCode { // UV check info!("Checking UV support and environment...\n"); - if !pv::misc::pv_guest_bit_set() { + if !pv_core::misc::pv_guest_bit_set() { println_and_exit_failure!("Failure: this is not a SE guest."); } let r = uv::has_list_secrets_facility(); @@ -455,7 +455,7 @@ mod tests { use super::*; use helper::hexstring_to_u8; - use pv::uv::SecretEntry; + use pv_core::uv::SecretEntry; // This is more or less only a test for the do_ap_config() function // However, this is THE main functionality of the whole application. diff --git a/rust/pvapconfig/src/uv.rs b/rust/pvapconfig/src/uv.rs index 2f98bd5e..202d2b4d 100644 --- a/rust/pvapconfig/src/uv.rs +++ b/rust/pvapconfig/src/uv.rs @@ -5,7 +5,7 @@ //! UV related functions for pvapconfig // -use pv::uv::{ListCmd, SecretList, UvDevice, UvcSuccess}; +use pv_core::uv::{ListCmd, SecretList, UvDevice, UvcSuccess}; use regex::Regex; use std::path::Path; @@ -85,7 +85,7 @@ mod tests { #[test] fn test_has_list_secrets_facility() { let r = has_list_secrets_facility(); - if pv::misc::pv_guest_bit_set() { + if pv_core::misc::pv_guest_bit_set() { assert!(r.is_ok()); } else { assert!(r.is_err()); @@ -96,7 +96,7 @@ mod tests { #[test] fn test_list_secrets() { let r = gather_secrets(); - if pv::misc::pv_guest_bit_set() { + if pv_core::misc::pv_guest_bit_set() { assert!(r.is_ok()); } else { assert!(r.is_err());