emomaxd commented on code in PR #19501:
URL: https://github.com/apache/nuttx/pull/19501#discussion_r3628264309
##########
arch/arm/src/common/arm_hostfs.c:
##########
@@ -232,7 +232,9 @@ off_t host_lseek(int fd, off_t pos, off_t offset, int
whence)
int host_ioctl(int fd, int request, unsigned long arg)
{
- return -ENOSYS;
+ /* Unsupported ioctl requests use ENOTTY so VFS can apply fallbacks. */
+
+ return -ENOTTY;
Review Comment:
From the NuttX documentation, -ENOTTY is returned after checking cmd, when
the specific request is not supported.
```c
int driver_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
{
int ret;
switch (cmd)
{
...
default:
ret = -ENOTTY;
break;
}
}
return ret;
}
```
Here, host_ioctl() does not inspect request at all and always fails, so
-ENOSYS seems more accurate for indicating that the operation itself is not
implemented.
--
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]