summaryrefslogtreecommitdiff
path: root/apps/nshlib/nsh_fscmds.c
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-02-01 07:24:16 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-02-01 07:24:16 -0600
commit55d5b35fffeba4221eafe5e161319088b92e12e1 (patch)
tree60a002fe1a1412a21c20119d70e1e3516ef71952 /apps/nshlib/nsh_fscmds.c
parent9dd15e33285b1d81984d346223ad7483c246a7a9 (diff)
downloadpx4-nuttx-55d5b35fffeba4221eafe5e161319088b92e12e1.tar.gz
px4-nuttx-55d5b35fffeba4221eafe5e161319088b92e12e1.tar.bz2
px4-nuttx-55d5b35fffeba4221eafe5e161319088b92e12e1.zip
drivers/ramdisk.c and include/nuttx/fs/ramdisk.h: Add logic to dispose of the drvier and RAM buffer when the RAM disk has been unlinked and all open references to the RAM disk have been closed. Add new parameters to romdisk() to specify what should be done with the RAM/ROM buffer -- Should it be freed or not? Changed all calls to ramdisk() to use these new parameters.
Diffstat (limited to 'apps/nshlib/nsh_fscmds.c')
-rw-r--r--apps/nshlib/nsh_fscmds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/nshlib/nsh_fscmds.c b/apps/nshlib/nsh_fscmds.c
index 34eb05c80..afde1e1c1 100644
--- a/apps/nshlib/nsh_fscmds.c
+++ b/apps/nshlib/nsh_fscmds.c
@@ -1250,7 +1250,8 @@ int cmd_mkrd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
/* Then register the ramdisk */
- ret = ramdisk_register(minor, buffer, nsectors, sectsize, true);
+ ret = ramdisk_register(minor, buffer, nsectors, sectsize,
+ RDFLAG_WRENABLED | RDFLAG_FUNLINK);
if (ret < 0)
{
nsh_output(vtbl, g_fmtcmdfailed, argv[0], "ramdisk_register", NSH_ERRNO_OF(-ret));