dg_mount(2) DG/UX 5.4R3.00 dg_mount(2)
NAME
dgmount - mount a file system
SYNOPSIS
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/nfs.h>
#include <sys/dgmount.h>
int dgmount (type, path, flags, data)
char * type;
char * path;
int flags;
char * data;
where:
type Address of a type string (must be nfs or dg/ux)
path Address of a pathname of a file 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 file. When mounting a
dg/ux or nfs file system, path must refer to a directory or CPD.
After a successful return, references to path will refer to the root
directory on the newly mounted file system. When mounting a namefs
file system, path may be any type of file. After a successful return,
references to path will refer to the named stream.
The following option flags are supported when mounting dg/ux and nfs
file systems:
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).
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. When mounting a physically
write protected device for read/write, the error ENXIO will result
(extended error is NO_WRITE_RING). The ENXIO error is interpreted by
the shell as no such device or address.
These flags are ignored when mounting a namefs file system.
Licensed material--property of copyright holder(s) 1
dg_mount(2) DG/UX 5.4R3.00 dg_mount(2)
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 dguxargs {
int version;
char *fspec;
int flags;
int filenodes;
int filespace;
modet permissions;
int logsize;
char *cachespec;
};
"nfs"
struct nfsargs {
int version;
struct sockaddrin *addr;
fhandlet *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;
};
"namefs"
struct namefsargs {
int fd;
};
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 (not currently used).
The additional flags for the memory file system variant are:
Licensed material--property of copyright holder(s) 2
dg_mount(2) DG/UX 5.4R3.00 dg_mount(2)
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 filenodes member of the structure contains the maximum
number of files allowed to be allocated to the particular
memory file system. filenodes must be a positive integer.
If this is not specified, the default file count for the
memory file system is 16384.
DGUXMNTFILESPACE
The filespace member of the structure contains the maximum
amount of file space allowed to be allocated in the particular
memory file system. filespace 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 cdrom file systems, you may specify:
DGUXMNTNOVERSION
When a user displays files on this file system (with ls or
another utility), do not display version numbers.
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.
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
Licensed material--property of copyright holder(s) 3
dg_mount(2) DG/UX 5.4R3.00 dg_mount(2)
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.
For namefs file systems, fd is an open file descriptor that refers to
a STREAMS-based pipe or a STREAMS device driver. The mount attaches
the stream to path so that all subsequent operations on path will
operate on the named stream. The flags word is ignored.
ACCESS CONTROL
The effective user id of the calling process must be superuser to
mount a dg/ux or nfs file system. When mounting a namefs file
system, the effective user id of the calling process must be
superuser, or the effective user id must be the owner of path and
have write access to path.
RETURN VALUE
0 Completed successfully.
-1 An error occurred. errno is set to indicate the error.
DIAGNOSTICS
Errno may be set to one of the following error codes:
ENOTDIR path is not a directory.
EPERM Permission to mount a file system device is denied to the
calling process.
EBUSY Another process is using path as its home or root
directory.
ENXIO A read/write mount is attempted on a physically write
protected device.
EBUSY Another file system is already mounted here.
Licensed material--property of copyright holder(s) 4
dg_mount(2) DG/UX 5.4R3.00 dg_mount(2)
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
mount(1M), getfh(2), mount(2), umount(2).
Licensed material--property of copyright holder(s) 5