find_blockdriver: Don't ferr() on MTDs

It's the normal path when you open a MTD. ferr() is too strong.
This commit is contained in:
YAMAMOTO Takashi 2021-03-15 11:29:34 +09:00 committed by Xiang Xiao
parent a06aa8e512
commit 87d5a39f68

View File

@ -94,7 +94,17 @@ int find_blockdriver(FAR const char *pathname, int mountflags,
if (!INODE_IS_BLOCK(inode))
{
ferr("ERROR: %s is not a block driver\n", pathname);
#ifdef CONFIG_MTD
if (INODE_IS_MTD(inode))
{
finfo("%s is a MTD\n", pathname);
}
else
#endif
{
ferr("ERROR: %s is not a block driver\n", pathname);
}
ret = -ENOTBLK;
goto errout_with_inode;
}