This structure is used with the getfsent , getfsspec , and
getfsfile functions.
char *fs_spec
- This element describes the device from which the filesystem is mounted.
Normally this is the name of a special device, such as a hard disk
partition, but it could also be a more or less generic string. For
NFS it would be a hostname and directory name combination.
Even though the element is not declared
const it shouldn't be
modified. The missing const has historic reasons, since this
function predates ISO C. The same is true for the other string
elements of this structure.
char *fs_file
- This describes the mount point on the local system. I.e., accessing any
file in this filesystem has implicitly or explicitly this string as a
prefix.
char *fs_vfstype
- This is the type of the filesystem. Depending on what the underlying
kernel understands it can be any string.
char *fs_mntops
- This is a string containing options passed to the kernel with the
mount call. Again, this can be almost anything. There can be
more than one option, separated from the others by a comma. Each option
consists of a name and an optional value part, introduced by an =
character.
If the value of this element must be processed it should ideally be done
using the getsubopt function; see Suboptions.
const char *fs_type
- This name is poorly chosen. This element points to a string (possibly
in the
fs_mntops string) which describes the modes with which the
filesystem is mounted. fstab defines five macros to describe the
possible values:
FSTAB_RW
- The filesystems gets mounted with read and write enabled.
FSTAB_RQ
- The filesystems gets mounted with read and write enabled. Write access
is restricted by quotas.
FSTAB_RO
- The filesystem gets mounted read-only.
FSTAB_SW
- This is not a real filesystem, it is a swap device.
FSTAB_XX
- This entry from the
fstab file is totally ignored.
Testing for equality with these value must happen using strcmp
since these are all strings. Comparing the pointer will probably always
fail.
int fs_freq
- This element describes the dump frequency in days.
int fs_passno
- This element describes the pass number on parallel dumps. It is closely
related to the
dump utility used on Unix systems.
|