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


##########
fs/rpmsgfs/rpmsgfs.c:
##########
@@ -262,7 +262,7 @@ static void rpmsgfs_mkpath(FAR struct rpmsgfs_mountpt_s *fs,
       int ret;
 
       ret = rpmsgfs_client_stat(fs->handle, fs->fs_root, &buf);
-      if (ret == 0)
+      if (ret <= 0)

Review Comment:
   rpmsgfs_get_tx_payload_buffer() already waits until the server endpoint is 
bound, so the stat() here reaches the server. A missing root (-ENOENT) can 
still appear later, but -EACCES and -EPERM do not change by waiting. With `ret 
<= 0` the loop also stops for -ENOENT, and the wait xiao asks for is gone.
   
   Fix: break for ret == 0 and for the permission errors only: `if (ret == 0 || 
ret == -EACCES || ret == -EPERM)`.



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