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



##########
File path: fs/mmap/fs_mmap.c
##########
@@ -142,6 +148,30 @@ FAR void *mmap(FAR void *start, size_t length, int prot, 
int flags,
     }
 #endif
 
+  if (fs_getfilep(fd, &filep) < 0)

Review comment:
       I agree, but at the same time we should avoid simply propagating errors 
upward that are not compatible to the function API.
   
   If you agree that returning EAGAIN is an error that should not happen here 
and does not make sense to propagate it, we could force it to fail in a 
DEBUGASSERT.
   This way it won't impact production code and it will help the debugging 
during development.
   What do you think?




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

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


Reply via email to