jlaitine commented on code in PR #8000:
URL: https://github.com/apache/nuttx/pull/8000#discussion_r1060000941


##########
fs/romfs/fs_romfs.c:
##########
@@ -617,6 +608,35 @@ static int romfs_ioctl(FAR struct file *filep, int cmd, 
unsigned long arg)
   return -ENOTTY;
 }
 
+static int     romfs_mmap(FAR struct file *filep, FAR void **addr,
+                          off_t start, size_t length)
+{
+  FAR struct romfs_mountpt_s *rm;
+  FAR struct romfs_file_s    *rf;
+  int ret = -EINVAL;
+
+  /* Sanity checks */
+
+  DEBUGASSERT(filep->f_priv != NULL && filep->f_inode != NULL);
+
+  /* Recover our private data from the struct file instance */
+
+  rf = filep->f_priv;
+  rm = filep->f_inode->i_private;
+
+  /* Return the address on the media corresponding to the start of

Review Comment:
   It is not immediately obvious to me how the thing works; I'll leave this 
improvement for later.



-- 
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: commits-unsubscr...@nuttx.apache.org

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

Reply via email to