[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1


getfsent_r, getfsspec_r, getfsfile_r, getfstype_r, setfsent_r, or endfsent_r Subroutine

Purpose

Gets information about a file system.

Library

Thread-Safe C Library (libc_r.a)

Syntax

#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;

Description

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.

Parameters


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.

Return Values


0 Indicates that the subroutine was successful.
-1 Indicates that the subroutine was not successful.

Implementation Specifics

These subroutines are part of Base Operating System (BOS) Runtime.

Programs using this subroutine must link to the libpthreads.a library.

Files


/etc/filesystems Centralizes file-system characteristics.

Related Information

The getvfsent, getvfsbytype, getvfsbyname, getvfsbyflag, setvfsent, or endvfsent (getvfsent, getvfsbytype, getvfsbyname, getvfsbyflag, setvfsent, or endvfsent Subroutine) subroutine.

The filesystems file in AIX 5L Version 5.1 Files Reference.

List of Multithread Subroutines in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]