fs/driver/fs_findmtddriver.c: Fix compile failed if NO CONFIG_MTD.

This commit is contained in:
ligd 2019-10-29 08:16:27 -06:00 committed by Gregory Nutt
parent 824666db9a
commit 77bf9b09a1
2 changed files with 9 additions and 2 deletions

View File

@ -40,10 +40,10 @@ CSRCS += fs_registerdriver.c fs_unregisterdriver.c
ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
CSRCS += fs_registerblockdriver.c fs_unregisterblockdriver.c
CSRCS += fs_findblockdriver.c fs_openblockdriver.c fs_closeblockdriver.c
CSRCS += fs_blockpartition.c
CSRCS += fs_blockpartition.c fs_findmtddriver.c
ifeq ($(CONFIG_MTD),y)
CSRCS += fs_registermtddriver.c fs_unregistermtddriver.c fs_findmtddriver.c
CSRCS += fs_registermtddriver.c fs_unregistermtddriver.c
CSRCS += fs_mtdproxy.c
ifeq ($(CONFIG_MTD_PARTITION),y)
CSRCS += fs_mtdpartition.c

View File

@ -125,4 +125,11 @@ errout_with_search:
return ret;
}
#else
int find_mtddriver(FAR const char *pathname, FAR struct inode **ppinode)
{
return -ENODEV;
}
#endif /* CONFIG_MTD */