Verifies that attribute values are within range.
#include <cf.h> #include <sys/cfgodm.h> #include <sys/cfgdb.h>
int attrval (uniquetype, pattr, errattr) char * uniquetype; char * pattr; char ** errattr;
The attrval subroutine is used to validate each of a list of input attribute values against the legal range. If no illegal values are found, this subroutine returns a value of 0. Otherwise, it returns the number of incorrect attributes.
If any attribute values are invalid, a pointer to a string containing a list of invalid attribute names is returned in the errattr parameter. These attributes are separated by spaces.
Allocation of the error buffer is done in the attrval subroutine. However, a character pointer (for example, char *errorb; ) must be declared in the calling routine. Thereafter, the address of that pointer is passed to the attrval subroutine (for example, attrval(...,&errorb); ) as one of the parameters.
0 | Indicates that all values are valid. |
Nonzero | Indicates the number of erroneous attributes. |
/usr/lib/libcfg.a | Archive of device configuration subroutines. |
List of Device Configuration Subroutines.
Predefined Attribute (PdAt) object class, Customized Attribute (CuAt) object class, Predefined Devices (PdDv) object class.