xiaoxiang781216 commented on PR #8868:
URL: https://github.com/apache/nuttx/pull/8868#issuecomment-1479228963

   > > In the sim, hostfs uses $CWD as the root path. When running in different 
paths, the access path of hostfs is different.
   > 
   > what's wrong with it?
   > 
   
   Here is an example, Directory layout:
   ···
   work/apps/
   work/nuttx/
   work/data/
   ···
   rcS contain:
   ···
   mount -t hostfs ../data /data
   ···
   if user launch nuttx by:
   ···
   cd work/nuttx
   ./nuttx
   ···
   he can access PC's data directory without error
   but if user launch nuttx by:
   ···
   cd work
   ./nuttx/nuttx
   ···
   ls /data will report the error.
   This patch ensures the user get the consistent result regardless he launches 
the program from anywhere.
   
   > > This patch is changed to use the path where the nuttx file is located as 
the root path, so that the mounted path is fixed when executed in different 
paths
   > 
   > i feel it's awkward to use the path of the executable for this purpose.
   
   Do you have better suggestion?


-- 
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

Reply via email to