summaryrefslogtreecommitdiffstats
path: root/nuttx/tools
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2008-09-10 19:29:24 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2008-09-10 19:29:24 +0000
commit7866c38227f42969d228bd62ac6f51a6623102e7 (patch)
treeeb3c0fa04693ffd428c362bb714b1fcbe824e08c /nuttx/tools
parent8235fd63ee0eb0791cea5ea1d4933b2a2c885d3f (diff)
ROMFS filesystem support
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@903 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/tools')
-rw-r--r--nuttx/tools/mkconfig.c34
1 files changed, 30 insertions, 4 deletions
diff --git a/nuttx/tools/mkconfig.c b/nuttx/tools/mkconfig.c
index c1653f3085..695b452989 100644
--- a/nuttx/tools/mkconfig.c
+++ b/nuttx/tools/mkconfig.c
@@ -1,7 +1,7 @@
-/************************************************************
+/****************************************************************************
* mkconfig.c
*
- * Copyright (C) 2007 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
- * 3. Neither the name Gregory Nutt nor the names of its contributors may be
+ * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -31,7 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- ************************************************************/
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
@@ -41,9 +45,17 @@
#include <unistd.h>
#include <errno.h>
+/****************************************************************************
+ * Definitions
+ ****************************************************************************/
+
#define DEFCONFIG ".config"
#define LINESIZE ( PATH_MAX > 256 ? PATH_MAX : 256 )
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
static char line[LINESIZE+1];
static char *skip_space(char *ptr)
@@ -167,6 +179,10 @@ static void show_usage(const char *progname)
exit(1);
}
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
int main(int argc, char **argv, char **envp)
{
char *filepath;
@@ -245,6 +261,16 @@ int main(int argc, char **argv, char **envp)
printf("/* If mountpoint support in not included, then no filesystem can be supported */\n\n");
printf("#ifdef CONFIG_DISABLE_MOUNTPOINT\n");
printf("# undef CONFIG_FS_FAT\n");
+ printf("# undef CONFIG_FS_ROMFS\n");
+ printf("#endif\n\n");
+ printf("/* Check if any readable and writable filesystem is supported */\n\n");
+ printf("#undef CONFIG_FS_READABLE\n");
+ printf("#undef CONFIG_FS_WRITABLE\n");
+ printf("#if defined(CONFIG_FS_FAT) || defined(CONFIG_FS_ROMFS)\n");
+ printf("# define CONFIG_FS_READABLE 1\n");
+ printf("#endif\n\n");
+ printf("#if defined(CONFIG_FS_FAT)\n");
+ printf("# define CONFIG_FS_WRITABLE 1\n");
printf("#endif\n\n");
printf("/* There can be no network support with no socket descriptors */\n\n");
printf("#if CONFIG_NSOCKET_DESCRIPTORS <= 0\n");