Node:fstab, Next:mtab, Up:Mount Information
fstab
fileThe internal representation for entries of the file is struct fstab
, defined in fstab.h
.
struct fstab | Data Type |
This structure is used with the getfsent , getfsspec , and
getfsfile functions.
|
To read the entire content of the of the fstab
file the GNU libc
contains a set of three functions which are designed in the usual way.
int setfsent (void) | Function |
This function makes sure that the internal read pointer for the
fstab file is at the beginning of the file. This is done by
either opening the file or resetting the read pointer.
Since the file handle is internal to the libc this function is not thread-safe. This function returns a non-zero value if the operation was successful
and the |
void endfsent (void) | Function |
This function makes sure that all resources acquired by a prior call to
setfsent (explicitly or implicitly by calling getfsent ) are
freed.
|
struct fstab * getfsent (void) | Function |
This function returns the next entry of the fstab file. If this
is the first call to any of the functions handling fstab since
program start or the last call of endfsent , the file will be
opened.
The function returns a pointer to a variable of type |
struct fstab * getfsspec (const char *name) | Function |
This function returns the next entry of the fstab file which has
a string equal to name pointed to by the fs_spec element.
Since there is normally exactly one entry for each special device it
makes no sense to call this function more than once for the same
argument. If this is the first call to any of the functions handling
fstab since program start or the last call of endfsent ,
the file will be opened.
The function returns a pointer to a variable of type |
struct fstab * getfsfile (const char *name) | Function |
This function returns the next entry of the fstab file which has
a string equal to name pointed to by the fs_file element.
Since there is normally exactly one entry for each mount point it
makes no sense to call this function more than once for the same
argument. If this is the first call to any of the functions handling
fstab since program start or the last call of endfsent ,
the file will be opened.
The function returns a pointer to a variable of type |