.TH MOUNT 2 .SH NAME mount \- mount a file system .SH SYNOPSIS .B int mount (spec, dir, rwflag) .br .B char \(**spec, \(**dir; .br .B int rwflag; .SH DESCRIPTION .I Mount\^ requests that a removable file system contained on the block special file identified by .I spec\^ be mounted on the directory identified by .IR dir . .I Spec\^ and .I dir\^ are pointers to path names. .PP Upon successful completion, references to the file .I dir\^ will refer to the root directory on the mounted file system. .PP The low-order bit of .I rwflag\^ is used to control write permission on the mounted file system; if .BR 1 , writing is forbidden, otherwise writing is permitted according to individual file accessibility. .PP .I Mount\^ may be invoked only by the super-user. .PP .I Mount\^ will fail if one or more of the following are true: .IP The effective user .SM ID is not super-user. .SM \%[EPERM] .IP Any of the named files does not exist. .SM \%[ENOENT] .IP A component of a path prefix is not a directory. .SM \%[ENOTDIR] .IP .I Spec\^ is not a block special device. .SM \%[ENOTBLK] .IP The device associated with .I spec\^ does not exist. .SM \%[ENXIO] .IP .I Dir\^ is not a directory. .SM \%[ENOTDIR] .IP .I Spec\^ or .I dir\^ points outside the process's allocated address space. .SM \%[EFAULT] .IP .I Dir\^ is currently mounted on, is someone's current working directory or is otherwise busy. .SM \%[EBUSY] .IP The device associated with .I spec\^ is currently mounted. .SM \%[EBUSY] .SH "RETURN VALUE" Upon successful completion a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" mount(1M), umount(2).