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:
parent
a06aa8e512
commit
87d5a39f68
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user