esp32_part_ioctl: Return -ENOTTY for unknown commands
It's traditional to use ENOTTY for this purpose. Littlefs seems to rely on this behavior for BIOC_FLUSH. Also, drop the log level.
This commit is contained in:
parent
a813f79c41
commit
37300a43a5
|
@ -497,8 +497,8 @@ static int esp32_part_ioctl(FAR struct mtd_dev_s *dev, int cmd,
|
|||
|
||||
if (!_MTDIOCVALID(cmd))
|
||||
{
|
||||
ferr("ERROR: cmd=%d(%x) is error\n", cmd, cmd);
|
||||
return -EINVAL;
|
||||
finfo("INFO: cmd=%d(%x) is error\n", cmd, cmd);
|
||||
return -ENOTTY;
|
||||
}
|
||||
|
||||
switch (_IOC_NR(cmd))
|
||||
|
|
Loading…
Reference in New Issue