diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-02-01 07:24:16 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-02-01 07:24:16 -0600 |
commit | 55d5b35fffeba4221eafe5e161319088b92e12e1 (patch) | |
tree | 60a002fe1a1412a21c20119d70e1e3516ef71952 /apps/examples | |
parent | 9dd15e33285b1d81984d346223ad7483c246a7a9 (diff) | |
download | px4-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/examples')
-rw-r--r-- | apps/examples/mount/ramdisk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/examples/mount/ramdisk.c b/apps/examples/mount/ramdisk.c index 21ec4c5e2..ded00c52b 100644 --- a/apps/examples/mount/ramdisk.c +++ b/apps/examples/mount/ramdisk.c @@ -1,7 +1,7 @@ /**************************************************************************** * examples/mount/ramdisk.c * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -116,7 +116,7 @@ int create_ramdisk(void) (FAR uint8_t *)pbuffer, CONFIG_EXAMPLES_MOUNT_NSECTORS, CONFIG_EXAMPLES_MOUNT_SECTORSIZE, - true); + RDFLAG_WRENABLED | RDFLAG_FUNLINK); if (ret < 0) { printf("create_ramdisk: Failed to register ramdisk at %s: %d\n", |