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 <sjg@chromium.org>
diff --git a/include/efi.h b/include/efi.h
index 789a64e..c559fda 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -678,6 +678,21 @@
*/
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
*