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

Technical Reference: Base Operating System and Extensions, Volume 1


getsubsvr Subroutine

Purpose

Reads a subsystem record.

Library

System Resource Controller Library (libsrc.a)

Syntax

#include <sys/srcobj.h>
#include <spc.h>


int getsubsvr( SubserverName, SRCSubserver)
char *SubserverName;
struct SRCSubsvr *SRCSubserver;

Description

The getsubsvr subroutine reads a subsystem record associated with the specified subserver and returns the ODM record in the SRCsubsvr structure.

The SRCsubsvr structure is defined in the sys/srcobj.h file and includes the following fields:

char sub_type[30];
char subsysname[30];
short sub_code;

Parameters


SRCSubserver Points to the SRCsubsvr structure.
SubserverName Specifies the subserver to be read.

Return Values

Upon successful completion, the getsubsvr subroutine returns a value of 0. Otherwise, it returns a value of -1 and the odmerrno variable is set to indicate the error, or an SRC error code is returned.

Error Codes

If the getsubsvr subroutine fails, the following is returned:

SRC_NOREC The specified SRCsubsvr record does not exist.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Files


/etc/objrepos/SRCsubsvr SRC Subserver Configuration object class.

Related Information

The getssys (getssys Subroutine) subroutine.

Defining Your Subsystem to the SRC, List of SRC Subroutines, System Resource Controller (SRC) Overview for Programmers in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


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