mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-07-05 11:20:00 +08:00
apps/examples/module: Fix some chaos in conditional compilation.
This commit is contained in:
parent
057eb80564
commit
367093e65c
@ -156,8 +156,7 @@ int module_main(int argc, char *argv[])
|
|||||||
#ifdef CONFIG_BUILD_FLAT
|
#ifdef CONFIG_BUILD_FLAT
|
||||||
struct boardioc_symtab_s symdesc;
|
struct boardioc_symtab_s symdesc;
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_EXAMPLES_MODULE_EXTERN) && \
|
#if defined(CONFIG_EXAMPLES_MODULE_FSMOUNT) && \
|
||||||
defined(CONFIG_EXAMPLES_MODULE_FSMOUNT) && \
|
|
||||||
defined(CONFIG_EXAMPLES_MODULE_FSREMOVEABLE)
|
defined(CONFIG_EXAMPLES_MODULE_FSREMOVEABLE)
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
#endif
|
#endif
|
||||||
@ -238,7 +237,7 @@ int module_main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_EXAMPLES_MODULE_ROMFS */
|
#endif /* CONFIG_EXAMPLES_MODULE_ROMFS */
|
||||||
#elif defined(CONFIG_EXAMPLES_MODULE_EXTERN)
|
#else /* CONFIG_EXAMPLES_MODULE_BUILTINFS */
|
||||||
/* An external file system is being used */
|
/* An external file system is being used */
|
||||||
|
|
||||||
#if defined(CONFIG_EXAMPLES_MODULE_FSMOUNT)
|
#if defined(CONFIG_EXAMPLES_MODULE_FSMOUNT)
|
||||||
@ -276,14 +275,14 @@ int module_main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Mount the external file system */
|
/* Mount the external file system */
|
||||||
|
|
||||||
message("Mounting %s filesystem at target=%s\n",
|
printf("Mounting %s filesystem at target=%s\n",
|
||||||
CONFIG_EXAMPLES_MODULE_FSTYPE, MOUNTPT);
|
CONFIG_EXAMPLES_MODULE_FSTYPE, MOUNTPT);
|
||||||
|
|
||||||
ret = mount(CONFIG_EXAMPLES_MODULE_DEVPATH, MOUNTPT,
|
ret = mount(CONFIG_EXAMPLES_MODULE_DEVPATH, MOUNTPT,
|
||||||
CONFIG_EXAMPLES_MODULE_FSTYPE, MS_RDONLY, NULL);
|
CONFIG_EXAMPLES_MODULE_FSTYPE, MS_RDONLY, NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
errmsg("ERROR: mount(%s, %s, %s) failed: %d\n",\
|
printf("ERROR: mount(%s, %s, %s) failed: %d\n",\
|
||||||
CONFIG_EXAMPLES_MODULE_DEVPATH, CONFIG_EXAMPLES_MODULE_FSTYPE,
|
CONFIG_EXAMPLES_MODULE_DEVPATH, CONFIG_EXAMPLES_MODULE_FSTYPE,
|
||||||
MOUNTPT, errno);
|
MOUNTPT, errno);
|
||||||
}
|
}
|
||||||
|
@ -211,4 +211,3 @@ ifeq ($(WINTOOL),y)
|
|||||||
else
|
else
|
||||||
LDELFFLAGS += -T $(TOPDIR)/scripts/gnu-elf.ld
|
LDELFFLAGS += -T $(TOPDIR)/scripts/gnu-elf.ld
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user