Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cfgcrdsz(3) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cfgcadsz

cfgcclsf

cfgcdlsz

cfgcopsf

attributes

cfgcrdsz

Purpose

     Reads an attribute file stanza.

Library

     Run-time Services Library (librts.a)

Syntax

     #include <cfg04.h>

     int cfgcrdsz (atfile, stanza, nbytes, stname)
     CFG__SFT *atfile;
     char *stanza;
     int nbytes;
     char *stname;

Description

     The cfgcrdsz  subroutine reads one stanza  from an attri-
     bute file.   A specific stanza  may be requested,  or the
     next stanza  in the file can  be read.  When a  stanza is
     read, any information contained  in a default stanza pre-
     ceding it  in the file  will be added to  the information
     returned  in the  buffer.  (For  details about  attribute
     files, see "attributes.")

     The  atfile parameter  points to  an open  attribute file
     structure.

     The stanza parameter points to  the buffer into which the
     stanza will be read.

     The nbytes parameter  is the size in bytes  of the buffer
     pointed to by the stanza parameter.

     The stname  parameter points  to a string  containing the
     name of  the stanza to be  read.  If this parameter  is a
     NULL pointer, then the next stanza in the file is read.

     The calling  program must  have an  effective user  ID of
     superuser to  access system  customization files  such as
     /etc/master, /etc/system, and /etc/predefined.

Return Value

     Upon  successful   completion,  the  value   CFG_SUCC  is
     returned.  If the cfgcrdsz  subroutine fails, then one of
     the following values is returned:

     CFG_EOF     The next stanza was requested, but the end of
                 the file has been reached.

     CFG_SZNF    The  requested stanza  was not  found in  the
                 file.

     CFG_SZBF    The  requested stanza  is longer  than nbytes
                 bytes.

     CFG_UNIO    Unrecoverable I/O error occurred during proc-
                 essing.

Related Information

     In  this  book:   "cfgcadsz,"   "cfgcclsf,"   "cfgcdlsz,"
     "cfgcopsf," and "attributes."

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026