dgmount(2) DG/UX 4.31 dgmount(2)
NAME
dg_mount - Mount a file system.
SYNOPSIS
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/nfs.h>
#include <sys/dg_mount.h>
int dg_mount (type,
directory,
flags,
data)
char * type;
char * directory;
int flags;
char * data;
PARAMETERS
type Address of a type string. Must be nfs or
dg/ux.
directory Address of a pathname of a directory to mount
upon.
flags Mount options flags.
data Type-specific argument structure.
DESCRIPTION
The dgmount system call is used to mount all file system
types. The dgmount call attaches a file system to a
directory. After a successful return, references to
directory will refer to the root directory on the newly
mounted file system.
The following option flags are supported:
MRDONLY
Mount the file system read-only.
MNOSUID
Ignore set-uid bits on files in this file system.
MREMOUNT
Change the options on an existing mount. For NFS file
systems, the following mount options may have their
values changed by this flag: wsize, rsize, timeo,
retrans, acregmin, acregmax, acdirmin, acdirmax,
honoring of set-uid bits on files on this filesystem,
and how the file system is mounted (that is, hard or
soft).
Licensed material--property of copyright holder(s) Page 1
dgmount(2) DG/UX 4.31 dgmount(2)
MNOSUB
Disallow mounts beneath this filesystem.
Physically write-protected file systems must be mounted
read-only; otherwise, errors will occur when access times
are updated, whether or not any explicit write is attempted.
The type string indicates the type of the filesystem. data
is a pointer to a structure that contains the type-specific
arguments to dgmount. Below is a list of the filesystem
types supported and the type-specific arguments to each:
"dg/ux"
struct dgux_args {
int version;
char *fspec;
int flags;
int file_nodes;
int file_space;
mode_t permissions;
};
struct nfs_args {
int version;
struct sockaddr_in *addr;
fhandle_t *fh;
int flags;
int wsize;
int rsize;
int timeo;
int retrans;
char *hostname;
int acregmin;
int acregmax;
int acdirmin;
int acdirmax;
char *netname;
int securewin;
};
For dg/ux file systems, the version must be
DGMOUNTDGUXVERSION, and fspec points to a character
string that names the block special device being mounted.
If the variant of the dg/ux mount is for a memory file
system, three additional flags come into play. A memory
file system is one that has no underlying media. Files
created in a memory file system will not persist across
system instantiations. Memory file systems are useful for
storing temporary files and for accelerating executable
images. Permissions is the mode to assign to file systems
that emulate DG/UX file systems on top of other file systems
Licensed material--property of copyright holder(s) Page 2
dgmount(2) DG/UX 4.31 dgmount(2)
(not currently used).
The additional flags for the memory file system variant are:
DGUXMNTMEMORYFS
The mount is for a file system that does not have any
backing media, that is, one whose file information and
data exist in the virtual memory of the system. If
this is set, the next two flags may also be defined.
If this flag is not set, the following two flags are
ignored.
DGUXMNTWIREDMEMORY
This instructs VM to use wired memory for the data in
the memory file system instead of unwired memory, which
is the default.
DGUXMNTFILECOUNT
The file_nodes member of the structure contains the
maximum number of files allowed to be allocated to the
particular memory file system. file_nodes must be a
positive integer. If this is not specified, the
default file count for the memory file system is 16384.
DGUXMNTFILESPACE
The file_space member of the structure contains the
maximum amount of file space allowed to be allocated in
the particular memory file system. file_space must be a
positive integer. If this is not specified, the
default amount of file space for the memory file system
is 2048 blocks, where a block is 512 bytes.
For NFS file systems, the version must also be
DGMOUNTNFSVERSION. The addr socket contains the UDP
address of the NFS file server. The fh file handle contains
the file handle on the server of the root of the file system
being mounted. The flags word is the logical OR of any of
these flags:
NFSMNTSOFT
The requested mount should be a soft mount.
NFSMNTWSIZE
The wsize member of the structure contains the maximum
transfer size (in bytes) to use when writing files. If
no value is specified, 8192 is used.
NFSMNTRSIZE
The rsize member of the structure contains the maximum
transfer size (in bytes) to use when reading files. If
no value is specified, 8192 is used.
Licensed material--property of copyright holder(s) Page 3
dgmount(2) DG/UX 4.31 dgmount(2)
NFSMNTRETRANS
The retrans member of the structure contains a
retransmission count for NFS retrys. If no value is
specified, 3 is used.
NFSMNTNOAC
Disable attribute caching for all files and
directories.
NFSMNTACREGMIN
The acregmin member of the structure contains a minimum
number of seconds to keep attributes cached for regular
files. If no value is specified, 3 seconds is used.
NFSMNTACREGMAX
The acregmax member of the structure contains a maximum
number of seconds to keep attributes cached for regular
files. If no value is specified, 60 seconds is used.
NFSMNTACDIRMIN
The acdirmin member of the structure contains a minimum
number of seconds to keep attributes cached for
directory files. If no value is specified, 30 seconds
is used.
NFSMNTACDIRMAX
The acdirmax member of the structure contains a maximum
number of seconds to keep attributes cached for
directory files. If no value is specified, 60 seconds
is used.
ACCESS CONTROL
The effective user id of the calling process must be
superuser.
RETURN VALUE
0 Completed successfully.
-1 An error occurred. Errno is set to indicate
the error.
EXCEPTIONS
Errno may be set to one of the following error codes:
ENOTDIR Directory is not a directory.
EPERM Permission to mount a file system device is
denied to the calling process.
EBUSY Another process is using the directory as its
home or root directory.
Licensed material--property of copyright holder(s) Page 4
dgmount(2) DG/UX 4.31 dgmount(2)
EBUSY Another file system is already mounted here.
EINVAL The version number in the filesystem specific
packet is not correct.
ENODEV Kernel support for the requested file system
type is not present.
Any of the pathname resolution errors.
SEE ALSO
The related system calls: mount(2), getfh(2),
mountd(1m), umount(2).
Licensed material--property of copyright holder(s) Page 5