xiaoxiang781216 commented on code in PR #8868: URL: https://github.com/apache/nuttx/pull/8868#discussion_r1160047733
########## arch/sim/Kconfig: ########## @@ -159,6 +159,15 @@ config SIM_HOSTFS ---help--- Access host filesystem through HostFS. +if SIM_HOSTFS + config SIM_HOSTFS_PATH_CONVERSION Review Comment: ```suggestion config SIM_HOSTFS_PATH_CONVERSION depends on SIM_HOSTFS ``` and remove if/endif ########## arch/sim/Kconfig: ########## @@ -159,6 +159,15 @@ config SIM_HOSTFS ---help--- Access host filesystem through HostFS. +if SIM_HOSTFS + config SIM_HOSTFS_PATH_CONVERSION + bool "Simulated HostFS path conversion" + default n + ---help--- + If this option is enabled, the nuttx file will be used as the root path Review Comment: ```suggestion If this option is enabled, the nuttx image folder will be used as the root path ``` ########## arch/sim/src/sim/posix/sim_hostfs.c: ########## @@ -36,10 +36,66 @@ #include "hostfs.h" +#ifdef CONFIG_HOST_MACOS +#include <sys/syslimits.h> +#include <mach-o/dyld.h> +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: host_path_convert + ****************************************************************************/ + +static int host_path_convert(const char *path, char *abspath, + uint32_t buflen) +{ +#ifndef CONFIG_SIM_HOSTFS_PATH_CONVERSION Review Comment: ```suggestion #ifdef CONFIG_SIM_HOSTFS_PATH_CONVERSION ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org