xiaoxiang781216 commented on code in PR #8924:
URL: https://github.com/apache/nuttx/pull/8924#discussion_r1292695652


##########
fs/binfs/fs_binfs.c:
##########
@@ -469,21 +469,35 @@ static int binfs_stat(struct inode *mountpt,
                       const char *relpath, struct stat *buf)
 {
   finfo("Entry\n");
+  int index;
+#ifdef CONFIG_SCHED_USER_IDENTITY
+  int mode;
+#endif
 
   /* The requested directory must be the volume-relative "root" directory */
 
   if (relpath && relpath[0] != '\0')
     {
       /* Check if there is a file with this name. */
 
-      if (builtin_isavail(relpath) < 0)
+      index = builtin_isavail(relpath);
+      if (index < 0)
         {
           return -ENOENT;
         }
 
       /* It's a execute-only file name */
 
       buf->st_mode = S_IFREG | S_IXOTH | S_IXGRP | S_IXUSR;
+
+#ifdef CONFIG_SCHED_USER_IDENTITY
+      buf->st_uid = builtin_getuid(index);
+      buf->st_gid = builtin_getgid(index);
+
+      mode = builtin_getmode(index);

Review Comment:
   let's apply the suggestion:
   https://github.com/apache/nuttx/pull/10203#discussion_r1292201964
   https://github.com/apache/nuttx-apps/pull/1691/files#r1292692039



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