Gets information about a file system.
Thread-Safe C Library (libc_r.a)
#include <fstab.h>
int getfsent_r (FSSent, FSFile, PassNo)
struct fstab * FSSent;
AFILE_t * FSFile;
int * PassNo;
int getfsspec_r (Special, FSSent, FSFile, PassNo)
const char * Special;
struct fstab *FSSent;
AFILE_t *FSFile;
int *PassNo;
int getfsfile_r (File, FSSent, FSFile, PassNo)
const char * File;
struct fstab *FSSent;
AFILE_t *FSFile;
int *PassNo;
int getfstype_r (Type, FSSent, FSFile, PassNo)
const char * Type;
struct fstab *FSSent;
AFILE_t *FSFile;
int *PassNo;
int setfsent_r (FSFile, PassNo)
AFILE_t * FSFile;
int *PassNo;
int endfsent_r (FSFile)
AFILE_t *FSFile;
The getfsent_r subroutine reads the next line of the /etc/filesystems file, opening it necessary.
The setfsent_r subroutine opens the filesystems file and positions to the first record.
The endfsent_r subroutine closes the filesystems file.
The getfsspec_r and getfsfile_r subroutines search sequentially from the beginning of the file until a matching special file name or file-system file name is found, or until the end of the file is encountered. The getfstype_r subroutine behaves similarly, matching on the file-system type field.
Programs using this subroutine must link to the libpthreads.a library.
Item | Description |
---|---|
FSSent | Points to a structure containing information about the file system. The FSSent parameter must be allocated by the caller. It cannot be a null value. |
FSFile | Points to an attribute structure. The FSFile parameter is used to pass values between subroutines. |
PassNo | Points to an integer. The setfsent_r subroutine initializes the PassNo parameter. |
Special | Specifies a special file name to search for in the filesystems file. |
File | Specifies a file name to search for in the filesystems file. |
Type | Specifies a type to search for in the filesystems file. |
Item | Description |
---|---|
0 | Indicates that the subroutine was successful. |
-1 | Indicates that the subroutine was not successful. |
Item | Description |
---|---|
/etc/filesystems | Centralizes file-system characteristics. |