⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mount.2

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 2
字号:
.\" SCCSID: @(#)mount.2	2.1	3/10/87.TH mount 2.SH Namemount, umount \- mount or unmount a file system.SH Syntax#include <sys/types.h>.br#include <sys/fs_types.h>.PPmount(\fIspecial, name, rwflag, type, options\fP).brchar *\fIspecial\fP, *\fIname\fP;.brint \fIrwflag\fP, \fItype\fP;.brchar *\fIoptions\fP;.PPumount(\fIdev\fP).brdev_t \fIdev\fP;.SH Description.NXB "mount system call (general)".NXB "file system" "mounting".NXB "file system" "removing".NXR "umount system call (general)".NXAM "mount system call (general)" "mount command (general)"The.PN mountsystem call announces to the system that a file system hasbeen mounted onspecial file,.I special.References to file.I namerefer tothe root file on the newly mounted file system..PPThe .I specialargument is a pointer to a null-terminated stringcontaining the pathname of the file system being mounted..PPThe .I nameargument is a pointer to a null-terminated string containing the pathnameof the root file on the newly mounted file system.  The.I namemust already exist and must be a directory.Its old contentsare inaccessible while the file systemis mounted..PPThe.I rwflagargument is used to determine whether the file system can be writtenon; if it is 0, the file system is writable, if nonzero, the filesystem is write-protected.  Physically write-protected disks andmagnetic tape file systems must be mounted read-only.The.PN mount call also detects devices that are offline atmount time and returns the appropriate error..PPThe .I type argument identifies the file system type that is being mounted.The file system types are defined in the <fs_types.h> file..PPThe .I options argument specifies certain parameters that can be used to define howthe file system is to be mounted..PPThe .I devargument to .PN umountis the device id andidentifies the device that contains the file system that is tobe unmounted..SH Environment.SS System VThe \fItype\fR and the \fIoptions\fR arguments are not available in the System V environment..PP.NXR "mount system call (general)" "System V and"Programs compiled in the System V environment cause.PN mount and.PN umountto set errno toENOTDIR, instead of EPERM (illegal char in directory name) or EROFS (directory onread  only  filesystem). If the process is not the superuser, errno isset to EPERM, instead of ENODEV, and if the file does not exist, errnois set to ENOENT, instead of ENODEV..PPAlso in the System V environment, only the low-order bit of.I rwflagis checked to determine write permission..PPIn the System V environment the syntax for .PN umount is as follows:.RS 5umount(\fIname\fR)char *\fIname\fR;.RE.PPThe argument to .PN umount specifies the file system to be unmounted.  In System V mode, the argument is the .PN name of thedevice that contains the file system that is to be unmounted; in all other modes, it is the device id..SH Return ValuesThe.PN mountsystem call returns 0 upon successful completion of a mount operation;it returns \-1 if the mount operation fails..PPThe.PN umountsystem callannounces to the system that the device.I devno longer contains a file system.The associated directory reverts to its ordinary interpretation..PPThe.PN umountsystem callreturns 0 if the dismount operation succeeds; \-1 if it fails..SH Diagnostics.NXR "mount system call (general)" "diagnostics"The.PN mountcall fails under the following conditions:.TP 15[EPERM]The caller is not the superuser..TP 15[ENODEV]A componentof.I specialdoes not exist or the device is offline..TP 15[ENOTBLK]The.I specialis not a block device..TP 15[ENXIO]The major device number of .I specialis out of range (indicating that no device driver existsfor the associated hardware)..TP 15[EINVAL]The file system type is out of range..TP 15[EINVAL]The super block for the file system had a bad magic number or anout-or-range block size..TP 15[EINVAL]The file system has not been unmounted cleanly, and the force option has not been set..TP 15[ENOTDIR]A component of.I nameis not a directory,or a path prefix of.I specialis already mounted..TP 15[EBUSY]Another process currently holds a reference to.IR name ,or.I specialis already mounted..TP 15[ENAMETOOLONG]A component of either pathname exceeded 255 characters,or the entire length of either pathname exceeded 1023characters..TP 15[ELOOP]Too many symbolic links were encountered in translatingeither pathname..TP 15[ENOENT]A component of.I namedoes not exist..TP 15[EMFILE]No space remains in the mount table..TP 15[ENOMEM]Not enough memory was available to read the cylindergroup information for the file system..TP 15[EIO]An I/O error occurred while reading the super block orcylinder group information..TP 15[EFAULT]The.I specialor.I namepoints outside the process's allocated address space space..TP 15[EROFS]The.I specialis a write-locked device and the user did not set the.I rwflag..PPThe.PN umountcommand fails under the following conditions:.TP 15[EPERM]The caller is not the superuser..TP 15[EINVAL]The requested device is not in the mount table..TP 15[EBUSY]A process is holding a reference to a file locatedon the file system..TP 15[EIO]An I/O error occurred while writing the super block or othercached file system information..TP 15[EREMOTE]An attempt has been made to mount an NFS remote file system thatis not local to the specified server.  This cannotoccur except in response to a failed .MS mount 2 ..TP[ETIMEDOUT]A connect request or remote file operation failedbecause the connected partydid not properly respond after a periodof time that is dependent on the communications protocol..SH See Alsomount(2nfs), mount(8), umount(8).NXE "mount system call (general)".NXE "file system" "mounting".NXE "file system" "removing"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -