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

Technical Reference: Base Operating System and Extensions, Volume 1

getfsent, getfsspec, getfsfile, getfstype, setfsent, or endfsent Subroutine

Purpose

Gets information about a file system.

Library

Standard C Library (libc.a)

Syntax

#include <fstab.h>

struct fstab *getfsent( ) 


struct fstab *getfsspec ( Special)
char *Special;


struct fstab *getfsfile( File)
char *File;


struct fstab *getfstype( Type)
char *Type;

void setfsent( )

void endfsent( )

Description

The getfsent subroutine reads the next line of the /etc/filesystems file, opening the file if necessary.

The setfsent subroutine opens the /etc/filesystems file and positions to the first record.

The endfsent subroutine closes the /etc/filesystems file.

The getfsspec and getfsfile subroutines sequentially search 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 subroutine does likewise, matching on the file-system type field.

Note
All information is contained in a static area, which must be copied to be saved.

Parameters

Special Specifies the file-system file name.
File Specifies the file name.
Type Specifies the file-system type.

Return Values

The getfsent, getfsspec, getfstype, and getfsfile subroutines return a pointer to a structure that contains information about a file system. The header file fstab.h describes the structure. A null pointer is returned when the end of file (EOF) is reached or if an error occurs.

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.

Files, Directories, and File Systems for Programmers in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

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