Skip to content

Commit

Permalink
DO NOT MERGE: hermit-entry workaround
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed Aug 11, 2023
1 parent b55698f commit cf0f8be
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub use crate::arch::kernel::{
get_base_address, get_cmdline, get_cmdsize, get_image_size, get_ram_address, get_tls_align,
get_tls_filesz, get_tls_memsz, get_tls_start,
};
#[cfg(not(target_arch = "riscv64"))]
use crate::kernel::boot_info;

static CLI: OnceCell<Cli> = OnceCell::new();
Expand All @@ -33,7 +34,15 @@ struct Cli {

/// Whether HermitCore is running under the "uhyve" hypervisor.
pub fn is_uhyve() -> bool {
matches!(boot_info().platform_info, PlatformInfo::Uhyve { .. })
#[cfg(not(target_arch = "riscv64"))]
{
matches!(boot_info().platform_info, PlatformInfo::Uhyve { .. })
}

#[cfg(target_arch = "riscv64")]
{
false
}
}

fn get_cmdline_str() -> &'static str {
Expand Down

0 comments on commit cf0f8be

Please sign in to comment.