Mount a file system.
Syntax
#include <sys/mount.h>
int mount (const char *source, const char *target, const char *fstype,
unsigned long flags, const void *data);
Parameters
-
source
The device or file to use as the underlying storage. May be null if the file system type does not need any.
-
target
The mount point where the contents of the file system will be available.
-
fstype
Name of the file system to mount. Supported types are:
-
fatfs
: For the FAT32 kernel module.
-
-
flags
Additional mount flags that will be passed to the file system.
-
data
Additional data that will be passed to the file system. The use of this argument depends on the file system type.
Return Value
The return value is null if successful. Otherwise, the return value is negative and errno is set:
-
ENODEV
Could not find the file system type requested.
-
ENOMEM
Out of memory.
The internal table of mounted file systems is full.
There are no free kernel or user file handles.
-
ENXIO
Incorrect instance identifier.
-
EBUSY
There is already an open file handle and the underlying device or file system does not allow sharing.
-
ENOENT
The supplied pathname could not be resolved.
Remarks
None