jlaitine commented on code in PR #8000: URL: https://github.com/apache/nuttx/pull/8000#discussion_r1060055210
########## fs/mmap/fs_mmap.c: ########## @@ -135,14 +135,33 @@ static int file_mmap_(FAR struct file *filep, FAR void *start, #endif } - /* Perform the ioctl to get the base address of the file in 'mapped' - * in memory. (casting to uintptr_t first eliminates complaints on some - * architectures where the sizeof long is different from the size of - * a pointer). + /* Call driver's mmap to get the base address of the file in 'mapped' + * in memory. */ - ret = file_ioctl(filep, FIOC_MMAP, (unsigned long)((uintptr_t)&addr)); - if (ret < 0) + if (filep->f_inode && filep->f_inode->u.i_ops->mmap != NULL) + { + /* Pass the information about the mapping in mm_map_entry_s structure. + * The driver may alter the structure, and if it supports unmap, it + * will also add it to the kernel maintained list of mappings. + */ + + struct mm_map_entry_s map = Review Comment: yes, I will. let's not put everything in this same PR, if that's ok with you -- 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