mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
rust/pvapconfig: use pv_base instead of pv crate
Replace the pv crate with the pv_core crate. Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
c8d4062f73
commit
fb65b53b9b
2
rust/Cargo.lock
generated
2
rust/Cargo.lock
generated
@@ -816,7 +816,7 @@ dependencies = [
|
||||
"lazy_static",
|
||||
"openssl",
|
||||
"openssl-sys",
|
||||
"pv",
|
||||
"pv_core",
|
||||
"rand",
|
||||
"regex",
|
||||
"serde",
|
||||
|
||||
@@ -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"] }
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user