summaryrefslogtreecommitdiff
path: root/nuttx/fs
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/fs')
-rw-r--r--nuttx/fs/mount/Make.defs2
-rw-r--r--nuttx/fs/mount/fs_automount.c6
-rw-r--r--nuttx/fs/mount/fs_mount.c2
-rw-r--r--nuttx/fs/mount/fs_umount2.c (renamed from nuttx/fs/mount/fs_umount.c)9
4 files changed, 9 insertions, 10 deletions
diff --git a/nuttx/fs/mount/Make.defs b/nuttx/fs/mount/Make.defs
index 26a6c0fd1..56596e81d 100644
--- a/nuttx/fs/mount/Make.defs
+++ b/nuttx/fs/mount/Make.defs
@@ -38,7 +38,7 @@
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
-CSRCS += fs_mount.c fs_umount.c fs_foreachmountpoint.c
+CSRCS += fs_mount.c fs_umount2.c fs_foreachmountpoint.c
ifeq ($(CONFIG_FS_AUTOMOUNTER),y)
CSRCS += fs_automount.c
diff --git a/nuttx/fs/mount/fs_automount.c b/nuttx/fs/mount/fs_automount.c
index e8207cb42..1efa80ada 100644
--- a/nuttx/fs/mount/fs_automount.c
+++ b/nuttx/fs/mount/fs_automount.c
@@ -290,7 +290,7 @@ static int automount_unmount(FAR struct automounter_state_s *priv)
/* Un-mount the volume */
- ret = umount(lower->mountpoint);
+ ret = umount2(lower->mountpoint, MNT_FORCE);
if (ret < 0)
{
int errcode = get_errno();
@@ -305,7 +305,7 @@ static int automount_unmount(FAR struct automounter_state_s *priv)
{
fvdbg("WARNING: Volume is busy, try again later\n");
- /* Start a timer to retry the umount after a delay */
+ /* Start a timer to retry the umount2 after a delay */
ret = wd_start(priv->wdog, lower->udelay, automount_timeout, 1,
(uint32_t)((uintptr_t)priv));
@@ -323,7 +323,7 @@ static int automount_unmount(FAR struct automounter_state_s *priv)
else
{
- fvdbg("ERROR: umount failed: %d\n", errcode);
+ fvdbg("ERROR: umount2 failed: %d\n", errcode);
return -errcode;
}
}
diff --git a/nuttx/fs/mount/fs_mount.c b/nuttx/fs/mount/fs_mount.c
index 4263f618b..9921bbe6f 100644
--- a/nuttx/fs/mount/fs_mount.c
+++ b/nuttx/fs/mount/fs_mount.c
@@ -353,7 +353,7 @@ int mount(FAR const char *source, FAR const char *target,
/* We can release our reference to the blkdrver_inode, if the filesystem
* wants to retain the blockdriver inode (which it should), then it must
* have called inode_addref(). There is one reference on mountpt_inode
- * that will persist until umount() is called.
+ * that will persist until umount2() is called.
*/
#ifdef BDFS_SUPPORT
diff --git a/nuttx/fs/mount/fs_umount.c b/nuttx/fs/mount/fs_umount2.c
index e7ea1c2d4..6d0609f9e 100644
--- a/nuttx/fs/mount/fs_umount.c
+++ b/nuttx/fs/mount/fs_umount2.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * fs/mount/fs_umount.c
+ * fs/mount/fs_umount2.c
*
- * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -70,7 +70,7 @@
****************************************************************************/
/****************************************************************************
- * Name: umount
+ * Name: umount2
*
* Description:
* umount() detaches the filesystem mounted at the path specified by
@@ -87,7 +87,7 @@
*
****************************************************************************/
-int umount(const char *target)
+int umount2(FAR const char *target, unsigned int flags)
{
FAR struct inode *mountpt_inode;
FAR struct inode *blkdrvr_inode = NULL;
@@ -203,4 +203,3 @@ errout:
set_errno(errcode);
return ERROR;
}
-