1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

Forgot to remove hermit/hermit_env.rs.

This commit is contained in:
bytesnake 2017-06-23 16:36:28 +02:00
parent 1df43d36a3
commit 192b0c09fe

View file

@ -1,55 +0,0 @@
use std::env;
use super::utils;
pub fn isle_kind() -> String {
env::var("HERMIT_ISLE").unwrap_or("qemu".into())
}
pub fn qemu_binary() -> String {
env::var("HERMIT_QEMU").unwrap_or("qemu-system-x86_64".into())
}
pub fn num_cpus() -> String {
env::var("HERMIT_CPUS").unwrap_or("1".into())
}
pub fn num_cpus_parsed() -> u32 {
env::var("HERMIT_CPUS").map(|x| x.parse().unwrap_or(1)).unwrap_or(1)
}
pub fn mem_size() -> String {
env::var("HERMIT_MEM").unwrap_or("2G".into())
}
pub fn mem_size_parsed() -> usize {
env::var("HERMIT_MEM").map(|x| utils::parse_mem(&x).unwrap_or(512*1024*1024)).unwrap_or(512*1024*1024)
}
pub fn use_kvm() -> String {
env::var("HERMIT_KVM").unwrap_or("1".into())
}
pub fn monitor() -> String {
env::var("HERMIT_MONITOR").unwrap_or("0".into())
}
pub fn should_debug() -> String {
env::var("HERMIT_DEBUG").unwrap_or("0".into())
}
pub fn capture_net() -> String {
env::var("HERMIT_CAPTURE_NET").unwrap_or("0".into())
}
pub fn verbose() -> String {
env::var("HERMIT_VERBOSE").unwrap_or("0".into())
}
pub fn port() -> String {
env::var("HERMIT_PORT").unwrap_or("18766".into())
}
pub fn app_port() -> String {
env::var("HERMIT_APP_PORT").unwrap_or("".into())
}