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



##########
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:
       > errno is very useful to identify the failure location without 
enabling/adding debug log.
   
   Actually, `errno` is not for debugging purposes, instead it is a error 
notification method for the consumer of the function API. That is why I insist 
that we shall only propagate error codes that are compatible to the API. All 
the other errors should be handled locally, even if the chosen handling is to 
ignore it.
   




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