Get the next entry from the filesystem table (/etc/fstab) file
#include <fstab.h> struct fstab * getfsent(void);
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
This function is in libc.a, but not in libc.so (in order to save space). |
The getfsent() function gets the next entry from the filesystem table file, /etc/fstab.
The getfsent(), getfsfile(), and getfsspec() functions return pointers to a fstab structure, which is defined as follows:
struct fstab { char *fs_spec; char *fs_file; char *fs_vfstype; char *fs_mntops; char *fs_type; int init_flags; int init_mask; };
The members include:
String | Constant | Meaning |
---|---|---|
implied | FSTAB_IMPLIED | The root entry was implied, not specified. |
allservers | FSTAB_OCB | Send the mount request to all servers. |
ro | FSTAB_RO | Read-only device. |
rw | FSTAB_RW | Read-write device. |
xx | FSTAB_XX | Completely ignore the entry. |
String | Constant | Meaning |
---|---|---|
ro | FSTAB_RO | Read-only device. |
rw | FSTAB_RW | Read-write device. |
xx | FSTAB_XX | Completely ignore the entry. |
A pointer to the fstab structure for the next entry in the file, or NULL if the function reached the end of the file.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
The functions that work with /etc/fstab use static data storage; if you need the data for future use, copy it before any subsequent calls overwrite it.
endfsent(), getfsfile(), getfsspec(), mount(), setfsent()
/etc/fstab, mount in the Utilities Reference