Unison Help
- Unison Kernel
- Pthreads
- pthread_create()
- pthread_exit()
- pthread_self()
- pthread_equal()
- pthread_join()
- pthread_detach()
- pthread_setschedparam()
- pthread_getschedparam()
- pthread_attr_init()
- pthread_attr_destroy()
- pthread_attr_setstackaddr()
- pthread_attr_getstackaddr()
- pthread_attr_setstacksize()
- pthread_attr_getstacksize()
- pthread_attr_setschedparam()
- pthread_attr_getschedparam()
- pthread_attr_setdetachstate()
- pthread_attr_getdetachstate()
- pthread_stackinfo()
- pthread_setprio()
- pthread_getprio()
- sched_get_priority_max()
- sched_get_priority_min()
- sched_yield()
- Pthread Cancellation
- Mutex
- Semaphores
- Message Queues
- Conditional Variables
- Barriers
- Timers
- Clocks
- Memory Allocation
- Rendezvous
- Interrupts
- Directory Services
- Miscellaneous
- Pthreads
- Unison I/O Library
- Unison STDIO Library
- STDIO Library Calls
- clearerr()
- dprintf()
- fclose()
- fdopen()
- feof()
- ferror()
- fileno()
- fflush()
- fgetc()
- fgetpos()
- fgets()
- fopen()
- fprintf()
- fputc()
- fputs()
- fread()
- freopen()
- fscanf()
- fseek()
- fseeko()
- fsetpos()
- ftell()
- ftello()
- fwrite()
- getc()
- getc_unlocked()
- getchar()
- getchar_unlocked()
- getdelim()
- getline()
- gets()
- get_stderr_ptr()
- get_stdin_ptr()
- get_stdout_ptr()
- noperprintf()
- perprintf()
- perror()
- posix_compat()
- printf()
- putc()
- putc_unlocked()
- putchar()
- putchar_unlocked()
- puts()
- remove()
- rewind()
- scanf()
- setbuf()
- setvbuf()
- snprintf()
- sprintf()
- sscanf()
- stderr_init()
- stderr_close()
- stdin_init()
- stdin_close()
- stdout_init()
- stdout_close()
- vdprintf()
- vscanf()
- vsscanf()
- vfscanf()
- vprintf()
- vsnprintf()
- vsprintf()
- vfprintf()
- ungetc()
- Do-nothing Stubs
- STDIO Library Calls
- Unison LIBC Library
- Unison I/O Servers
- Graphics, Camera, Video, Audio
- Network Protocols
- TCP and UDP Server - tcpd
- DHCP Client Service - dhcp client
- DHCP Server - dhcpd
- Telnet Server - telnetd
- Tiny FTP Server - tftpd
- Point to Point - pppd
- Network Translation - NAT with PAT
- Firewall
- Tiny HTTP Server - thttpd
- Tiny HTTP Server with TLS
- POP3 Server
- Simple Mail Transfer Protocol Services (SMTP)
- Bootp Protocol
- File Transfer Protocol Server (FTP)
- File Transfer Client Services
- RPC / XDR
- DNS Client
- HTTP/HTTPS Client
- REST Client
- AutoIP Service - autoip client
- mDNS server - mdnsd
- SNTP Client
- SNMP Agent - Snmpd server
- SSL/TLS library
- SSH server
- IP security
- Power Control
- Serial I/O
- System Services
- Universal Serial Bus (USB)
- Wireless
- Remedy Tools for Unison
2.17.mount() #
NAME
mount – mount a file system
SYNOPSIS
#include <fnctl.h>
#include <sys/mount.h>
- int mount(const char *spec ,
- const char *dir ,
- int mflag );
- int umount(const char *dir);
DESCRIPTION
The mount() function requests that a removable file system contained on the block special file identified by spec be mounted on the directory identified by dir. The spec and dir arguments are pointers to path names.
The umount() function unmounts the file system mounted at dir.
The mflag flag is used to control write permission on the mounted file system: If set to FS_RDONLY, writing is forbidden; otherwise writing is permitted according to individual file accessibility. After a successful call to mount(), all references to the file dir refer to the root directory on the mounted file system.
RETURN VALUES
Upon successful completion a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error.
ERRORS
This function is a member of Unison’s IOLIB family of functions. IOLIB is implemented as a message passing and generalized interface layer. Each Unison I/O server is responsible for its own error reporting.
For an exact list of error codes returned by a particular server, refer to that server’s documentation in the Unison Programmer’s Guide for each specific platform.
Servers may implement these errors codes in response to this function.
mount() fails if one or more of the following are true:
- EBUSY
- dir is currently mounted or is otherwise busy. Or, the device associated with spec is currently mounted. Or, there are no more mount table entries.
- EFAULT
- spec, dir, or datalen points outside the allocated address space of the process.
- EINVAL
- The super block has an invalid magic number or the fstyp is invalid.
- EMULTIHOP
- Components of path require hopping to multiple remote machines and the file system type does not allow it.
- ENAMETOOLONG
- The length of an argument is too large.
- ENOENT
- One of the named arguments does not exist or is a null pathname.
- EREMOTE
- spec is remote and cannot be mounted.
- ENOLINK
- path points to a remote machine and the link to that machine is no longer active.
- ENXIO
- The device associated with spec does not exist.
- EROFS
- spec is write protected and mflag requests write permission.
- ENOSPC
- The file system state in the super-block is not
SEE ALSO
NOTES
The mflag parameter is, currently, ignored by the FATFS implementation.