summaryrefslogtreecommitdiff
path: root/apps/examples/mount
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-01-01 08:52:58 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-01-01 08:52:58 -0600
commit4274c0fe3987e8c22176d249581888ff6da5db92 (patch)
tree035ed731dc52352f9f62c03e8e382f74ce718501 /apps/examples/mount
parent3060000303e7dbd8afc745cd4208b222bad6cc4d (diff)
downloadnuttx-4274c0fe3987e8c22176d249581888ff6da5db92.tar.gz
nuttx-4274c0fe3987e8c22176d249581888ff6da5db92.tar.bz2
nuttx-4274c0fe3987e8c22176d249581888ff6da5db92.zip
sim/mount: Converted to use kconfig-frontends tools
Diffstat (limited to 'apps/examples/mount')
-rw-r--r--apps/examples/mount/Kconfig46
-rw-r--r--apps/examples/mount/mount_main.c1
2 files changed, 46 insertions, 1 deletions
diff --git a/apps/examples/mount/Kconfig b/apps/examples/mount/Kconfig
index b38c4763c..f5281d685 100644
--- a/apps/examples/mount/Kconfig
+++ b/apps/examples/mount/Kconfig
@@ -10,4 +10,48 @@ config EXAMPLES_MOUNT
Enable the file system mount example
if EXAMPLES_MOUNT
-endif
+
+config EXAMPLES_MOUNT_BLOCKDEVICE
+ bool "Use block device"
+ default n
+ ---help---
+ Use an existing block device to mount. If EXAMPLES_MOUNT_BLOCKDEVICE
+ is not selected, then a RAM disk will be configured for the test.
+
+if EXAMPLES_MOUNT_BLOCKDEVICE
+
+config EXAMPLES_MOUNT_DEVNAME
+ string "Block device name"
+ default "/dev/mtdblock0"
+ ---help---
+ The name of the user-provided block device to mount. Must be
+ provided if EXAMPLES_MOUNT_BLOCKDEVICE is selected.
+
+endif # EXAMPLES_MOUNT_BLOCKDEVICE
+
+if !EXAMPLES_MOUNT_BLOCKDEVICE
+
+config EXAMPLES_MOUNT_NSECTORS
+ int "RAM disk number of sectors"
+ default 2048
+ ---help---
+ The number of "sectors" in the RAM disk used when
+ EXAMPLES_MOUNT_BLOCKDEVICE is not selected.
+
+config EXAMPLES_MOUNT_SECTORSIZE
+ int "RAM disk sector size"
+ default 512
+ ---help---
+ The size of each sectors in the RAM disk used when
+ EXAMPLES_MOUNT_BLOCKDEVICE is not selected.
+
+config EXAMPLES_MOUNT_RAMDEVNO
+ int "RAM disk device number"
+ default 0
+ ---help---
+ The RAM device minor number used to mount the RAM disk used when
+ EXAMPLES_MOUNT_BLOCKDEVICE is not selected. The default is zero
+ (meaning that "/dev/ram0" will be used).
+
+endif # !EXAMPLES_MOUNT_BLOCKDEVICE
+endif # EXAMPLES_MOUNT
diff --git a/apps/examples/mount/mount_main.c b/apps/examples/mount/mount_main.c
index e0eb8a615..b1615677a 100644
--- a/apps/examples/mount/mount_main.c
+++ b/apps/examples/mount/mount_main.c
@@ -219,6 +219,7 @@ static void show_directories(const char *path, int indent)
/****************************************************************************
* Name: fail_read_open
****************************************************************************/
+
#ifdef CONFIG_EXAMPLES_MOUNT_DEVNAME
static void fail_read_open(const char *path, int expectederror)
{