From 1b50ff64a52b08bebb17d947eb95c18ba88fa20f Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 29 Apr 2021 19:34:34 -0600 Subject: bsd-user: implement path searching Use the PATH to find the executable given a bare argument. We need to do this so we can implement mixing native and emulated binaries (e.g., execing a x86 native binary from an emulated arm binary to optimize parts of the build). By finding the binary, we will know how to exec it. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/qemu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bsd-user/qemu.h') diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 5237e35f9c..6b601ce4b5 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -124,7 +124,8 @@ struct bsd_binprm { int argc, envc; char **argv; char **envp; - char *filename; /* Name of binary */ + char *filename; /* (Given) Name of binary */ + char *fullpath; /* Full path of binary */ }; void do_init_thread(struct target_pt_regs *regs, struct image_info *infop); -- cgit 1.4.1