diff options
Diffstat (limited to 'nuttx/fs/nxffs')
-rw-r--r-- | nuttx/fs/nxffs/nxffs.h | 5 | ||||
-rw-r--r-- | nuttx/fs/nxffs/nxffs_initialize.c | 14 |
2 files changed, 15 insertions, 4 deletions
diff --git a/nuttx/fs/nxffs/nxffs.h b/nuttx/fs/nxffs/nxffs.h index 87bc06227..89adb6dac 100644 --- a/nuttx/fs/nxffs/nxffs.h +++ b/nuttx/fs/nxffs/nxffs.h @@ -1,7 +1,7 @@ /**************************************************************************** * fs/nxffs/nxffs.h * - * Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * References: Linux/Documentation/filesystems/romfs.txt @@ -1098,7 +1098,8 @@ int nxffs_readdir(FAR struct inode *mountpt, FAR struct fs_dirent_s *dir); int nxffs_rewinddir(FAR struct inode *mountpt, FAR struct fs_dirent_s *dir); int nxffs_bind(FAR struct inode *blkdriver, FAR const void *data, FAR void **handle); -int nxffs_unbind(FAR void *handle, FAR struct inode **blkdriver); +int nxffs_unbind(FAR void *handle, FAR struct inode **blkdriver, + unsigned int flags); int nxffs_statfs(FAR struct inode *mountpt, FAR struct statfs *buf); int nxffs_stat(FAR struct inode *mountpt, FAR const char *relpath, FAR struct stat *buf); diff --git a/nuttx/fs/nxffs/nxffs_initialize.c b/nuttx/fs/nxffs/nxffs_initialize.c index d7d55f077..13081b6c1 100644 --- a/nuttx/fs/nxffs/nxffs_initialize.c +++ b/nuttx/fs/nxffs/nxffs_initialize.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/nxffs/nxffs_initialize.c * - * Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * References: Linux/Documentation/filesystems/romfs.txt @@ -550,11 +550,21 @@ int nxffs_bind(FAR struct inode *blkdriver, FAR const void *data, * ****************************************************************************/ -int nxffs_unbind(FAR void *handle, FAR struct inode **blkdriver) +int nxffs_unbind(FAR void *handle, FAR struct inode **blkdriver, + unsigned int flags) { #ifndef CONFIG_NXFFS_PREALLOCATED # error "No design to support dynamic allocation of volumes" #else + /* This implementation currently only supports unmounting if there are no + * open file references. + */ + + if (flags != 0) + { + return -ENOSYS; + } + return g_volume.ofiles ? -EBUSY : OK; #endif } |