mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
fs: Add nx_mount/nx_umount2 function
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -188,6 +188,10 @@
|
||||
#define OPEN_SETFD(f) ((f) | OPEN_MAGIC)
|
||||
#define OPEN_GETFD(r) ((r) & OPEN_MASK)
|
||||
|
||||
/* nx_umount() is equivalent to nx_umount2() with flags = 0 */
|
||||
|
||||
#define umount(t) umount2(t,0)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Type Definitions
|
||||
****************************************************************************/
|
||||
@@ -678,6 +682,46 @@ int register_mtdpartition(FAR const char *partition,
|
||||
int unregister_mtddriver(FAR const char *path);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nx_mount
|
||||
*
|
||||
* Description:
|
||||
* nx_mount() is similar to the standard 'mount' interface except that is
|
||||
* not a cancellation point and it does not modify the errno variable.
|
||||
*
|
||||
* nx_mount() is an internal NuttX interface and should not be called from
|
||||
* applications.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero is returned on success; a negated value is returned on any failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_DISABLE_MOUNTPOINT
|
||||
int nx_mount(FAR const char *source, FAR const char *target,
|
||||
FAR const char *filesystemtype, unsigned long mountflags,
|
||||
FAR const void *data);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nx_umount2
|
||||
*
|
||||
* Description:
|
||||
* nx_umount2() is similar to the standard 'umount2' interface except that
|
||||
* is not a cancellation point and it does not modify the errno variable.
|
||||
*
|
||||
* nx_umount2() is an internal NuttX interface and should not be called
|
||||
* from applications.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero is returned on success; a negated value is returned on any failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_DISABLE_MOUNTPOINT
|
||||
int nx_umount2(FAR const char *target, unsigned int flags);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: files_initlist
|
||||
*
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@
|
||||
#define MNT_EXPIRE (1 << 2)
|
||||
#define UMOUNT_NOFOLLOW (0)
|
||||
|
||||
/* mount() is equivalent to umount2() with flags = 0 */
|
||||
/* umount() is equivalent to umount2() with flags = 0 */
|
||||
|
||||
#define umount(t) umount2(t,0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user