66 lines
2.4 KiB
HTML
66 lines
2.4 KiB
HTML
<html><!-- This HTML file has been created by texi2html 1.29
|
|
from syscalls.texi on 4 June 1994 -->
|
|
|
|
<TITLE>Syscall specifications of Linux - mount</TITLE>
|
|
<P>Go to the <A HREF="syscalls_21.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_21.html">previous</A>, <A HREF="syscalls_23.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_23.html">next</A> section.<P>
|
|
<H2><A NAME="SEC22" HREF="syscalls_toc.html#SEC22" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_toc.html#SEC22">mount and umount</A></H2>
|
|
<P>
|
|
<H3>SYNOPSIS</H3>
|
|
<P>
|
|
<CODE>int mount(const char *<VAR>specialfile</VAR>, const char *<VAR>dir</VAR>,
|
|
const char *<VAR>filesystemtype</VAR>,unsigned long <VAR>rwflag</VAR>, const void
|
|
*<VAR>data</VAR>);</CODE>
|
|
<P>
|
|
<CODE>int umount(const char *<VAR>specialfile</VAR>);</CODE>
|
|
<P>
|
|
<H3>PARAMETERS</H3>
|
|
<P>
|
|
<VAR>specialfile</VAR>: [in] points to the path of the file system to mount.
|
|
<P>
|
|
<VAR>dir</VAR>: [in] points to the directory where to mount the file system.
|
|
<P>
|
|
<CODE>filesystemtype</CODE>: [in] the type of file system.
|
|
<P>
|
|
<VAR>rwflag</VAR>: [in] specifies read/write accesses to the file system.
|
|
<P>
|
|
<VAR>data</VAR>: [in] fs dependent parameters.
|
|
<P>
|
|
<H3>DESCRIPTION</H3>
|
|
<P>
|
|
<CODE>mount</CODE> mounts the file system and <CODE>umount</CODE> unmounts it. Only
|
|
a task with superuser privileges may call those two syscalls.
|
|
<P>
|
|
The <VAR>rwflag</VAR> parameter may take the one or more of following or'ed
|
|
values:
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT><CODE>MS_RDONLY</CODE>
|
|
<DD>mount read-only.
|
|
<P>
|
|
<DT><CODE>MS_NOSUID</CODE>
|
|
<DD>ignore suid and sgid bits.
|
|
<P>
|
|
<DT><CODE>MS_NODEV</CODE>
|
|
<DD>disallow access to device special files.
|
|
<P>
|
|
<DT><CODE>MS_NOEXEC</CODE>
|
|
<DD>disallow program execution.
|
|
<P>
|
|
<DT><CODE>MS_SYNC</CODE>
|
|
<DD>writes are synced at once.
|
|
<P>
|
|
<DT><CODE>MS_REMOUNT</CODE>
|
|
<DD>alter flags of a mounted FS.
|
|
</DL>
|
|
<P>
|
|
<H3>RETURN VALUE</H3>
|
|
<P>
|
|
<UL>
|
|
<LI><CODE>EPERM</CODE>, <CODE>ENODEV</CODE>, <CODE>ENOTBLK</CODE>, <CODE>ENXIO</CODE>,
|
|
<CODE>EMFILE</CODE>, <CODE>EFAULT</CODE>, <CODE>ENOMEM</CODE>, <CODE>EINVAL</CODE>,
|
|
<CODE>EBUSY</CODE>, <CODE>ENOTDIR</CODE>, <CODE>ENOENT</CODE>, <CODE>ENAMETOOLONG</CODE>,
|
|
<CODE>ELOOP</CODE>, <CODE>EROFS</CODE>.
|
|
</UL>
|
|
<P>
|
|
<P>Go to the <A HREF="syscalls_21.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_21.html">previous</A>, <A HREF="syscalls_23.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_23.html">next</A> section.<P>
|