.th K_mount II 4/21/86
.sh NAME
K_mount - mount a KSOS filesystem
.sh "MODULA SYNOPSIS"
.nf
 CONST extSeid: seid;
 CONST readOnly: boolean;
 VAR nsp: nsp_type;
 VAR stat: K_err_num;
 . . .
 stat := NK_mount(extSeid, readOnly, nsp);
.sp
.sh "C SYNOPSIS"
 seid extSeid;
 nsp_type nsp;
 boolean readOnly;
 int stat;
 . . .
 stat = K_mount (extSeid, readOnly, &nsp);
.fi
.sp
.sh DESCRIPTION
The K_mount call performs the function of associating a particular file
name space partition with the extent, extSeid, making it possible to
access files in the mounted file system.
.sp
Use of this call requires the privilege privMount which normally
restricts the use of this call to the NKSR `mount' program (MNT).
It is the responsibility of the privileged program to insure that the file
system being mounted is a valid file system, that the Immigration
Officer function has approved its use, and that the user invoking `mount'
is authorized to operate on the file system involved.
.sp
Each mounted KSOS file system belongs to a different name space
partition.  The Kernel assures this by assigning a name space partition
to the file system when the file system is mounted.  The Immigration
Officer software [NKSR 78] maintains a database of file systems
currently immigrated.  When an extent is mounted, the Kernel shall
update an internal database which tells it on which extent the SEIDs in
the mounted name space partition may be found.  The nsp value returned
by the K_mount call determines the name space partition which the
Kernel will expect in operations referring to files in the newly
mounted file system.
.sp
The first K_mount after startup of the Kernel will always return the
same value, and by convention this value is associated with the "root"
file system.
.sp
It is possible to mount a file system as read only by setting readOnly
to true, in which case no file on the file system can be opened for
writing, new files cannot be created, and existing files cannot be
altered or deleted.  The physical device may be placed in write-protect
mode without interfering with read-only mounts.
.sp
Each file system contains type independent information.  The security
and integrity levels of the file system shall be interpreted as the
maximum levels allowed for any file on the extent.  The Kernel prevents
K_create operations by any process not permitted data flow to the file
system under the security model.
.sp
Note that extents may contain data structures other than KSOS file
systems.  A given extent may be assigned for private, non-file system
use.  However, only extents belonging to the subtype `file system' may
be mounted.
.sh EXCEPTIONS
.lp 22 15
Xbusy	Extent is busy.
.lp 22 15
XbadFs1	Internal filesystem error.
.lp 22 15
XnoObj	Extent specified by extSeid
does not exist or is inaccessable to the process.
.i0
.sh "SEE ALSO"
K_create(II),
K_unmount(II),
priv_struct(IIa),
tii_struct(IIa),
MNT(VIII)
