mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-22 17:59:31 +00:00
kata-sys-utils: fix warnings for s390x
The warning reports as bwlow: ``` --> kata-sys-util/src/protection.rs:145:9 | 145 | return Err(ProtectionError::NoPerms)?; | ^^^^^^^ help: remove it | ... error: `to_string` applied to a type that implements `Display` in `format!` args --> kata-sys-util/src/protection.rs:151:16 | 151 | err.to_string() | ^^^^^^^^^^^^ help: remove this ``` Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
This commit is contained in:
parent
730b0f1769
commit
283fd45045
@ -142,7 +142,7 @@ pub fn arch_guest_protection(
|
|||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub fn available_guest_protection() -> Result<GuestProtection, ProtectionError> {
|
pub fn available_guest_protection() -> Result<GuestProtection, ProtectionError> {
|
||||||
if !Uid::effective().is_root() {
|
if !Uid::effective().is_root() {
|
||||||
return Err(ProtectionError::NoPerms)?;
|
Err(ProtectionError::NoPerms)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
let facilities = crate::cpu::retrieve_cpu_facilities().map_err(|err| {
|
let facilities = crate::cpu::retrieve_cpu_facilities().map_err(|err| {
|
||||||
|
Loading…
Reference in New Issue
Block a user