sandbox: Add a function to load a relative file path
authorSimon Glass <sjg@chromium.org>
Wed, 7 Sep 2022 02:27:08 +0000 (20:27 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 29 Sep 2022 20:09:56 +0000 (16:09 -0400)
commit73c5cb9dacbcf2e988fffa66750c4206fccc8cbc
tree2665b1f5aaf1519c9600694ff0be67da23e9de58
parent2b90e0d54efe6e83c9313c863184b71eb811853e
sandbox: Add a function to load a relative file path

At present this implementation is specific to loading the test FDT. We
plan to load others, so create a generic function to handle this.

The path is now limited to 256 characters, to simplify the code.

When there is an empty argv[0] (which should not happen), the function now
just uses the path as is, with no prefix.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/cpu/start.c
arch/sandbox/cpu/state.c
arch/sandbox/include/asm/state.h