1
0
mirror of https://github.com/containers/youki synced 2024-11-22 17:02:00 +01:00

print "unknown" instead of defaults if we cannot get kernel config

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
This commit is contained in:
Yashodhan Joshi 2024-10-28 11:18:50 +05:30
parent 4077c5d588
commit 860fba699d

@ -59,6 +59,8 @@ pub fn print_os() {
println!("{:<18}{}", "Operating System", os);
} else if let Some(os) = try_read_os_from("/usr/lib/os-release") {
println!("{:<18}{}", "Operating System", os);
} else {
println!("{:<18}UNKNOWN", "Operating System");
}
}
@ -204,6 +206,9 @@ pub fn print_namespaces() {
println!("{:<18}disabled", "Namespaces");
return;
}
} else {
println!("{:<18}UNKNOWN", "Namespaces");
// we don't return as we can atleast try and see if anything is enabled
}
// mount namespace is always enabled if namespaces are enabled
@ -266,7 +271,7 @@ fn print_feature_status(config: &str, feature: &str, display: FeatureDisplay) {
println!(" {:<16}{}", display.name, status);
} else {
println!(" {:<16}{}", display.name, display.disabled);
println!(" {:<16}UNKNOWN", display.name);
}
}