diff options
| author | Simon Glass <[email protected]> | 2024-11-07 14:31:46 -0700 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2024-11-09 10:01:47 +0100 |
| commit | 7506c1566998d188867423bd184a9dd00a9246c4 (patch) | |
| tree | 87fbe298c2929c733a9eb8209c3dfb92487c1ca4 /include | |
| parent | 9fd84a3e1f70c4684ca43c9c1376b3b68d4f7cf1 (diff) | |
sandbox: Report host default-filename in native mode
When the --native flag is given, pretend to be running the host
architecture rather than sandbox.
Allow the same control for PXE too.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/efi.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/efi.h b/include/efi.h index 789a64eda9d..c559fda3004 100644 --- a/include/efi.h +++ b/include/efi.h @@ -678,6 +678,21 @@ void efi_show_tables(struct efi_system_table *systab); */ const char *efi_get_basename(void); +#ifdef CONFIG_SANDBOX +#include <asm/state.h> +#endif + +static inline bool efi_use_host_arch(void) +{ +#ifdef CONFIG_SANDBOX + struct sandbox_state *state = state_get_current(); + + return state->native; +#else + return false; +#endif +} + /** * efi_get_pxe_arch() - Get the architecture value for PXE * |
