Search for a block special device in the filesystem table (/etc/fstab) file
#include <fstab.h> struct fstab * getfsspec(const char *spec);
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The getfsfile() function searches the filesystem table (/etc/fstab) for an entry for the specified block special device.
A pointer to the fstab structure for the block special device (see the entry for getfsent()), or NULL if the entry couldn't be found.
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.