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/13 14:45:29 UTC

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

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



##########
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:
       > But one thing that was bugging me was that `-ENOSYS` is intended for **optional** features that are not implemented, which is not the the case for `stat`.
   
   Then perhaps you might consider -ENOTSUP.  “Not supported.” A function returns this error when certain parameter values are valid, but the functionality they request is not available. This can mean that the function does not implement a particular command or option value or flag bit at all.




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