xiaoxiang781216 commented on a change in pull request #4121:
URL: https://github.com/apache/incubator-nuttx/pull/4121#discussion_r668408982



##########
File path: fs/vfs/fs_stat.c
##########
@@ -120,6 +120,10 @@ static int stat_recursive(FAR const char *path,
 
           ret = inode->u.i_mops->stat(inode, desc.relpath, buf);
         }
+      else
+        {
+          ret = -ENOSYS;

Review comment:
       If the file system doesn't provide stat implementation, it is wrong to 
return OK but with the bad/unitial value in the stat buf. How to interpret the 
error code not mention in standard? I think the error code is the 
implementation detail, OS can return other suitable error code, unless the 
standared specially note the error case and code(e.g. EAGAIN, EINTR...).




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to