You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/07/12 19:54:52 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4121: vfs: stat_recursive should return -ENOSYS if stat callback is NULL

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



##########
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:
       According to the standard, `stat` should not return `ENOSYS` as an error code:
   https://pubs.opengroup.org/onlinepubs/007904875/functions/stat.html
   
   What's the purpose for returning `ENOSYS` here?




-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org