casaroli commented on code in PR #21613:
URL: https://github.com/apache/nuttx/pull/21613#discussion_r4524327055


##########
fs/rpmsgfs/rpmsgfs_server.c:
##########
@@ -390,6 +390,19 @@ static int rpmsgfs_open_handler(FAR struct rpmsg_endpoint 
*ept,
     }
 
   ret = file_open(filep, msg->pathname, msg->flags, msg->mode);
+  if (ret >= 0 && (msg->flags & O_ACCMODE) == O_RDONLY)
+    {
+      struct stat buf;
+
+      /* A directory: the client opens it with the directory messages */
+
+      if (file_fstat(filep, &buf) >= 0 && S_ISDIR(buf.st_mode))

Review Comment:
   This check is already on the server: rpmsgfs_open_handler() runs there, and 
file_fstat() is a local call on the server, not a message to the client.



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