xiaoxiang781216 commented on code in PR #8000:
URL: https://github.com/apache/nuttx/pull/8000#discussion_r1060034528
##########
fs/tmpfs/fs_tmpfs.c:
##########
@@ -1658,20 +1656,13 @@ static int tmpfs_ioctl(FAR struct file *filep, int cmd,
unsigned long arg)
DEBUGASSERT(tfo != NULL);
- /* Only one ioctl command is supported */
-
- if (cmd == FIOC_MMAP && ppv != NULL)
+ if (map != NULL)
Review Comment:
if (offset + length <= tfo->tfo_size)
{
map->vaddr = tfo->tfo_data + offset;
}
##########
fs/tmpfs/fs_tmpfs.c:
##########
@@ -1658,20 +1656,13 @@ static int tmpfs_ioctl(FAR struct file *filep, int cmd,
unsigned long arg)
DEBUGASSERT(tfo != NULL);
- /* Only one ioctl command is supported */
-
- if (cmd == FIOC_MMAP && ppv != NULL)
+ if (map != NULL)
Review Comment:
```
if (offset + length <= tfo->tfo_size)
{
map->vaddr = tfo->tfo_data + offset;
}
```
--
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]