diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-11-07 15:35:09 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-11-07 15:35:09 -0600 |
commit | 67b1faa23c59f2284aab49aafb94f14185f6ac4a (patch) | |
tree | ed4b2daf1357ec298b1c96d8851fd84d6772eb8d /apps/examples/bastest/bastest_main.c | |
parent | b20c2c13f229704f5b4b9a43d8323f24e18977f2 (diff) | |
download | nuttx-67b1faa23c59f2284aab49aafb94f14185f6ac4a.tar.gz nuttx-67b1faa23c59f2284aab49aafb94f14185f6ac4a.tar.bz2 nuttx-67b1faa23c59f2284aab49aafb94f14185f6ac4a.zip |
BAS: Fix some build errors wtih apps/examples/bastest
Diffstat (limited to 'apps/examples/bastest/bastest_main.c')
-rw-r--r-- | apps/examples/bastest/bastest_main.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/examples/bastest/bastest_main.c b/apps/examples/bastest/bastest_main.c index 3cf70c681..fe6da27f8 100644 --- a/apps/examples/bastest/bastest_main.c +++ b/apps/examples/bastest/bastest_main.c @@ -38,7 +38,12 @@ ****************************************************************************/ #include <nuttx/config.h> + +#include <sys/mount.h> #include <stdio.h> +#include <errno.h> + +#include <nuttx/fs/ramdisk.h> #include "romfs.h" @@ -93,6 +98,8 @@ int main(int argc, FAR char *argv[]) int bastest_main(int argc, char *argv[]) #endif { + int ret; + /* Create a ROM disk for the ROMFS filesystem */ printf("Registering romdisk at /dev/ram%d\n", CONFIG_EXAMPLES_BASTEST_DEVMINOR); @@ -100,19 +107,19 @@ int bastest_main(int argc, char *argv[]) NSECTORS(romfs_img_len), SECTORSIZE); if (ret < 0) { - err("ERROR: romdisk_register failed: %d\n", ret); + fprintf(stderr, "ERROR: romdisk_register failed: %d\n", ret); return 1; } /* Mount the file system */ - message("Mounting ROMFS filesystem at target=%s with source=%s\n", + printf("Mounting ROMFS filesystem at target=%s with source=%s\n", MOUNTPT, CONFIG_EXAMPLES_BASTEST_DEVPATH); ret = mount(CONFIG_EXAMPLES_BASTEST_DEVPATH, MOUNTPT, "romfs", MS_RDONLY, NULL); if (ret < 0) { - err("ERROR: mount(%s,%s,romfs) failed: %s\n", + fprintf(stderr, "ERROR: mount(%s,%s,romfs) failed: %s\n", CONFIG_EXAMPLES_BASTEST_DEVPATH, MOUNTPT, errno); return 1; } |