Deleted Added
full compact
mount.2 (22527) mount.2 (23660)
1.\" Copyright (c) 1980, 1989, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 15 unchanged lines hidden (view full) ---

24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
1.\" Copyright (c) 1980, 1989, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 15 unchanged lines hidden (view full) ---

24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)mount.2 8.2 (Berkeley) 12/11/93
32.\" @(#)mount.2 8.3 (Berkeley) 5/24/95
33.\"
33.\"
34.Dd December 11, 1993
34.Dd May 24, 1995
35.Dt MOUNT 2
36.Os BSD 4
37.Sh NAME
38.Nm mount ,
39.Nm unmount
40.Nd mount or dismount a filesystem
41.Sh SYNOPSIS
42.Fd #include <sys/param.h>

--- 68 unchanged lines hidden (view full) ---

111.Pp
112The flag
113.Dv MNT_RELOAD
114causes the vfs subsystem to update its data structures pertaining to
115the specified already mounted filesystem.
116.Pp
117The
118.Fa type
35.Dt MOUNT 2
36.Os BSD 4
37.Sh NAME
38.Nm mount ,
39.Nm unmount
40.Nd mount or dismount a filesystem
41.Sh SYNOPSIS
42.Fd #include <sys/param.h>

--- 68 unchanged lines hidden (view full) ---

111.Pp
112The flag
113.Dv MNT_RELOAD
114causes the vfs subsystem to update its data structures pertaining to
115the specified already mounted filesystem.
116.Pp
117The
118.Fa type
119argument defines the type of the filesystem.
120The types of filesystems known to the system are defined in
121.Aq Pa sys/mount.h .
119argument names the filesystem.
120The types of filesystems known to the system can be obtained with
121.Xr sysctl 8
122by using the command:
123.Bd -literal -offset indent
124sysctl vfs
125.Ed
126.Pp
122.Fa Data
123is a pointer to a structure that contains the type
124specific arguments to mount.
127.Fa Data
128is a pointer to a structure that contains the type
129specific arguments to mount.
125The currently supported types of filesystems and
126their type specific data are:
130The format for these argument structures is described in the
131manual page for each filesystem.
132By convention filesystem manual pages are named
133by prefixing ``mount_'' to the name of the filesystem as returned by
134.Xr sysctl 8 .
135Thus the
136.Nm NFS
137filesystem is described by the
138.Xr mount_nfs 8
139manual page.
127.Pp
140.Pp
128.Bd -literal -compact
129/*
130 * Export arguments for local filesystem mount calls.
131 */
132struct export_args {
133 int ex_flags; /* export related flags */
134 uid_t ex_root; /* mapping for root uid */
135 struct ucred ex_anon; /* mapping for anonymous user */
136 struct sockaddr *ex_addr; /* net address to which exported */
137 int ex_addrlen; /* and the net address length */
138 struct sockaddr *ex_mask; /* mask of valid bits in saddr */
139 int ex_masklen; /* and the smask length */
140};
141.Ed
142.Pp
143.Dv MOUNT_UFS
144.Pp
145.Bd -literal -compact
146/*
147 * Arguments to mount UFS-bases filesystems
148 */
149struct ufs_args {
150 char *fspec; /* Block special file to mount */
151 struct export_args export; /* network export information */
152};
153.Ed
154.Pp
155.Dv MOUNT_NFS
156.Pp
157.Bd -literal -compact
158#ifdef NFS
159/*
160 * Arguments to mount NFS
161 */
162
163#define NFS_ARGSVERSION 3 /* change when nfs_args changes */
164struct nfs_args {
165 int version; /* args structure version number */
166 struct sockaddr *addr; /* file server address */
167 int addrlen; /* length of address */
168 int sotype; /* Socket type */
169 int proto; /* and Protocol */
170 u_char *fh; /* File handle to be mounted */
171 int fhsize; /* Size, in bytes, of fh */
172 int flags; /* flags */
173 int wsize; /* write size in bytes */
174 int rsize; /* read size in bytes */
175 int readdirsize; /* readdir size in bytes */
176 int timeo; /* initial timeout in .1 secs */
177 int retrans; /* times to retry send */
178 int maxgrouplist; /* Max. size of group list */
179 int readahead; /* # of blocks to readahead */
180 int leaseterm; /* Term (sec) of lease */
181 int deadthresh; /* Retrans threshold */
182 char *hostname; /* server's name */
183};
184
185/*
186 * NFS mount option flags
187 */
188#define NFSMNT_SOFT 0x00000001 /* soft mount (hard is default) */
189#define NFSMNT_WSIZE 0x00000002 /* set write size */
190#define NFSMNT_RSIZE 0x00000004 /* set read size */
191#define NFSMNT_TIMEO 0x00000008 /* set initial timeout */
192#define NFSMNT_RETRANS 0x00000010 /* set number of request retries */
193#define NFSMNT_MAXGRPS 0x00000020 /* set maximum grouplist size */
194#define NFSMNT_INT 0x00000040 /* allow interrupts on hard mount */
195#define NFSMNT_NOCONN 0x00000080 /* Don't Connect the socket */
196#define NFSMNT_NQNFS 0x00000100 /* Use Nqnfs protocol */
197#define NFSMNT_NFSV3 0x00000200 /* Use NFS Version 3 protocol */
198#define NFSMNT_KERB 0x00000400 /* Use Kerberos authentication */
199#define NFSMNT_DUMBTIMR 0x00000800 /* Don't estimate rtt dynamically */
200#define NFSMNT_LEASETERM 0x00001000 /* set lease term (nqnfs) */
201#define NFSMNT_READAHEAD 0x00002000 /* set read ahead */
202#define NFSMNT_DEADTHRESH 0x00004000 /* set dead server retry thresh */
203#define NFSMNT_RESVPORT 0x00008000 /* Allocate a reserved port */
204#define NFSMNT_RDIRPLUS 0x00010000 /* Use Readdirplus for V3 */
205#define NFSMNT_READDIRSIZE 0x00020000 /* Set readdir size */
206#define NFSMNT_INTERNAL 0xfffc0000 /* Bits set internally */
207#define NFSMNT_HASWRITEVERF 0x00040000 /* Has write verifier for V3 */
208#define NFSMNT_GOTPATHCONF 0x00080000 /* Got the V3 pathconf info */
209#define NFSMNT_GOTFSINFO 0x00100000 /* Got the V3 fsinfo */
210#define NFSMNT_MNTD 0x00200000 /* Mnt server for mnt point */
211#define NFSMNT_DISMINPROG 0x00400000 /* Dismount in progress */
212#define NFSMNT_DISMNT 0x00800000 /* Dismounted */
213#define NFSMNT_SNDLOCK 0x01000000 /* Send socket lock */
214#define NFSMNT_WANTSND 0x02000000 /* Want above */
215#define NFSMNT_RCVLOCK 0x04000000 /* Rcv socket lock */
216#define NFSMNT_WANTRCV 0x08000000 /* Want above */
217#define NFSMNT_WAITAUTH 0x10000000 /* Wait for authentication */
218#define NFSMNT_HASAUTH 0x20000000 /* Has authenticator */
219#define NFSMNT_WANTAUTH 0x40000000 /* Wants an authenticator */
220#define NFSMNT_AUTHERR 0x80000000 /* Authentication error */
221#endif /* NFS */
222.Ed
223.Pp
224.Dv MOUNT_MFS
225.Pp
226.Bd -literal -compact
227/*
228 * Arguments to mount MFS
229 */
230struct mfs_args {
231 char *fspec; /* name to export for statfs */
232 struct export_args export; /* if exported MFSes are supported */
233 caddr_t base; /* base of file system in memory */
234 u_long size; /* size of file system */
235};
236.Ed
237.Pp
238.Dv MOUNT_MSDOSFS
239.Pp
240.Bd -literal -compact
241#ifdef MSDOSFS
242/*
243 * Arguments to mount MSDOS filesystems.
244 */
245struct msdosfs_args {
246 char *fspec; /* blocks special holding the fs to mount */
247 struct export_args export; /* network export information */
248 uid_t uid; /* uid that owns msdosfs files */
249 gid_t gid; /* gid that owns msdosfs files */
250 mode_t mask; /* mask to be applied for msdosfs perms */
251};
252#endif
253.Ed
254.Pp
255.Dv MOUNT_CD9660
256.Pp
257.Bd -literal -compact
258#ifdef CD9660
259/*
260 * Arguments to mount ISO 9660 filesystems.
261 */
262struct iso_args {
263 char *fspec; /* block special device to mount */
264 struct export_args export; /* network export info */
265 int flags; /* mounting flags, see below */
266
267};
268#define ISOFSMNT_NORRIP 0x00000001 /* disable Rock Ridge Ext.*/
269#define ISOFSMNT_GENS 0x00000002 /* enable generation numbers */
270#define ISOFSMNT_EXTATT 0x00000004 /* enable extended attributes */
271#endif /* CD9660 */
272.Ed
273.Pp
274The
275.Fn umount
276function call disassociates the filesystem from the specified
277mount point
278.Fa dir .
279.Pp
280The
281.Fa flags

--- 148 unchanged lines hidden (view full) ---

430.Em ufs
431or
432.Em mfs
433mount can also fail if the maximum number of filesystems are currently
434mounted.
435.Sh SEE ALSO
436.Xr mfs 8 ,
437.Xr mount 8 ,
141The
142.Fn umount
143function call disassociates the filesystem from the specified
144mount point
145.Fa dir .
146.Pp
147The
148.Fa flags

--- 148 unchanged lines hidden (view full) ---

297.Em ufs
298or
299.Em mfs
300mount can also fail if the maximum number of filesystems are currently
301mounted.
302.Sh SEE ALSO
303.Xr mfs 8 ,
304.Xr mount 8 ,
305.Xr sysctl 8 ,
438.Xr umount 8
439.Sh BUGS
440Some of the error codes need translation to more obvious messages.
441.Sh HISTORY
442.Fn Mount
443and
444.Fn umount
445function calls appeared in
446.At v6 .
306.Xr umount 8
307.Sh BUGS
308Some of the error codes need translation to more obvious messages.
309.Sh HISTORY
310.Fn Mount
311and
312.Fn umount
313function calls appeared in
314.At v6 .