Document the new 'data_len' argument.

Remove references to nfs export args and xref nfssvc(2) instead.
Change text to allow for other fs types.
This commit is contained in:
dsl 2007-07-14 18:24:08 +00:00
parent 45d83b0ef5
commit 8f51f1bf76

View File

@ -1,4 +1,4 @@
.\" $NetBSD: mount.2,v 1.36 2006/02/24 20:49:38 wiz Exp $
.\" $NetBSD: mount.2,v 1.37 2007/07/14 18:24:08 dsl Exp $
.\"
.\" Copyright (c) 1980, 1989, 1993
.\" The Regents of the University of California. All rights reserved.
@ -29,7 +29,7 @@
.\"
.\" @(#)mount.2 8.3 (Berkeley) 5/24/95
.\"
.Dd February 11, 2006
.Dd July 14, 2007
.Dt MOUNT 2
.Os
.Sh NAME
@ -42,7 +42,7 @@
.In sys/param.h
.In sys/mount.h
.Ft int
.Fn mount "const char *type" "const char *dir" "int flags" "void *data"
.Fn mount "const char *type" "const char *dir" "int flags" "void *data" "size_t data_len"
.Ft int
.Fn unmount "const char *dir" "int flags"
.Sh DESCRIPTION
@ -54,7 +54,9 @@ at the point
.Ar dir .
The argument
.Ar data
describes the file system object to be mounted.
describes the file system object to be mounted, and is
.Ar data_len
bytes long.
The argument
.Ar type
tells the kernel how to interpret
@ -138,14 +140,13 @@ The types of file systems known to the system are defined in
.Fa data
is a pointer to a structure that contains the type
specific arguments to mount.
The currently supported types of file systems and
Some of the currently supported types of file systems and
their type specific data are:
.Pp
.Dv MOUNT_FFS
.Bd -literal -offset indent -compact
struct ufs_args {
char *fspec; /* block special file to mount */
struct export_args export; /* network export information */
};
.Ed
.Pp
@ -177,7 +178,7 @@ struct nfs_args {
.Bd -literal -offset indent -compact
struct mfs_args {
char *fspec; /* name to export for statfs */
struct export_args export; /* if we can export an MFS */
struct export_args30 pad; /* unused */
caddr_t base; /* base of file system in mem */
u_long size; /* size of file system */
};
@ -211,8 +212,12 @@ but any further accesses to any other active files result in errors
even if the file system is later remounted.
.Sh RETURN VALUES
.Fn mount
returns the value 0 if the mount was successful, otherwise \-1 is returned
and the variable
returns the value 0 if the mount was successful,
the number of bytes written to
.Ar data
for
.Dv MNT_GETARGS ,
otherwise \-1 is returned and the variable
.Va errno
is set to indicate the error.
.Pp
@ -356,6 +361,7 @@ mount can also fail if the maximum number of file systems are currently
mounted.
.Sh SEE ALSO
.Xr getvfsstat 2 ,
.Xr nfssvc 2 ,
.Xr getmntinfo 3 ,
.Xr symlink 7 ,
.Xr mount 8 ,
@ -370,5 +376,17 @@ and
.Fn unmount )
function calls appeared in
.At v6 .
.Pp
Prior to NetBSD 4.0 the
.Nm
call ws used to NFS export filesystems.
This is now done through
.Fn nfssvc .
.Pp
The
.Dv data_len
argument was added for NetBSD 5.0.
.Sh BUGS
Some of the error codes need translation to more obvious messages.
.Pp
Far more filesystems are supported than those those listed.