mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
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:
committed by
Xiang Xiao
parent
a06aa8e512
commit
87d5a39f68
@@ -94,7 +94,17 @@ int find_blockdriver(FAR const char *pathname, int mountflags,
|
|||||||
|
|
||||||
if (!INODE_IS_BLOCK(inode))
|
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;
|
ret = -ENOTBLK;
|
||||||
goto errout_with_inode;
|
goto errout_with_inode;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user