kata-ctl: fix build error on s390x

Some type is not imported in s390x's mod file.

Fixes: #5987

Signed-off-by: Bin Liu <bin@hyper.sh>
This commit is contained in:
Bin Liu 2023-01-06 11:15:47 +08:00
parent 31abe170fc
commit c21a8d5ff8
3 changed files with 2 additions and 17 deletions

View File

@ -9,6 +9,7 @@ pub use arch_specific::*;
mod arch_specific {
use crate::check;
use crate::types::*;
use anyhow::{anyhow, Result};
const PROC_CPUINFO: &str = "/proc/cpuinfo";
@ -38,7 +39,7 @@ mod arch_specific {
Ok(())
}
pub fn check() -> Result<()> {
pub fn check(_args: &str) -> Result<()> {
println!("INFO: check: s390x");
let _cpu_result = check_cpu();

View File

@ -16,12 +16,6 @@ struct Release {
tarball_url: String,
}
#[cfg(any(
target_arch = "aarch64",
target_arch = "powerpc64le",
target_arch = "x86_64"
))]
const KATA_GITHUB_RELEASE_URL: &str =
"https://api.github.com/repos/kata-containers/kata-containers/releases";

View File

@ -93,20 +93,10 @@ pub fn handle_check(checkcmd: CheckArgument) -> Result<()> {
}
CheckSubCommand::OnlyListReleases => {
// retrieve official release
#[cfg(any(
target_arch = "aarch64",
target_arch = "powerpc64le",
target_arch = "x86_64"
))]
check::check_official_releases()?;
}
CheckSubCommand::IncludeAllReleases => {
// retrieve ALL releases including prerelease
#[cfg(any(
target_arch = "aarch64",
target_arch = "powerpc64le",
target_arch = "x86_64"
))]
check::check_all_releases()?;
}
}