mirror of
https://github.com/containers/youki
synced 2024-11-26 06:08:07 +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:
parent
4077c5d588
commit
860fba699d
@ -59,6 +59,8 @@ pub fn print_os() {
|
|||||||
println!("{:<18}{}", "Operating System", os);
|
println!("{:<18}{}", "Operating System", os);
|
||||||
} else if let Some(os) = try_read_os_from("/usr/lib/os-release") {
|
} else if let Some(os) = try_read_os_from("/usr/lib/os-release") {
|
||||||
println!("{:<18}{}", "Operating System", os);
|
println!("{:<18}{}", "Operating System", os);
|
||||||
|
} else {
|
||||||
|
println!("{:<18}UNKNOWN", "Operating System");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,6 +206,9 @@ pub fn print_namespaces() {
|
|||||||
println!("{:<18}disabled", "Namespaces");
|
println!("{:<18}disabled", "Namespaces");
|
||||||
return;
|
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
|
// 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);
|
println!(" {:<16}{}", display.name, status);
|
||||||
} else {
|
} else {
|
||||||
println!(" {:<16}{}", display.name, display.disabled);
|
println!(" {:<16}UNKNOWN", display.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user