You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2023/01/03 22:46:13 UTC

[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #8021: fs: Move mmap callback before truncate in [file|mountpt]_operations

pkarashchenko commented on code in PR #8021:
URL: https://github.com/apache/nuttx/pull/8021#discussion_r1061010646


##########
drivers/video/video.c:
##########
@@ -3200,13 +3206,16 @@ static int video_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
 
 static int video_mmap(FAR struct file *filep, FAR struct mm_map_entry_s *map)
 {
-  FAR struct inode *inode = filep->f_inode;
-  FAR video_mng_t  *priv  = (FAR video_mng_t *)inode->i_private;
+  FAR struct inode     *inode    = filep->f_inode;
+  FAR video_mng_t      *priv     = (FAR video_mng_t *)inode->i_private;
+  FAR video_type_inf_t *type_inf = &priv->video_inf;
+  size_t heapsize = get_heapsize(type_inf);

Review Comment:
   either align with above of remove spaces from above.



##########
fs/nxffs/nxffs_initialize.c:
##########
@@ -54,12 +54,12 @@ const struct mountpt_operations nxffs_operations =
   nxffs_write,       /* write */
   NULL,              /* seek -- Use f_pos in struct file */
   nxffs_ioctl,       /* ioctl */
+  NULL,              /* mmap */
 #ifdef __NO_TRUNCATE_SUPPORT__

Review Comment:
   Just note here:
   I can't find how `__NO_TRUNCATE_SUPPORT__` can be enabled. Should we clean it up?



-- 
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-unsubscribe@nuttx.apache.org

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