[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 2

putattr Device Configuration Subroutine


Updates, deletes, or creates an attribute object in the Customized Attribute (CuAt) object class.


Object Data Manager Library (libodm.a)


#include <cf.h>
#include <sys/cfgodm.h>
#include <sys/cfgdb.h>

int putattr (cuobj)
struct CuAt *cuobj;


cuobj Specifies the attribute object.


The putattr device configuration subroutine either updates an old attribute object, creates a new object for the attribute information, or deletes an existing object in the CuAt object class. The putattr subroutine queries the CuAt object class to determine whether an object already exists with the device name and attribute name specified by the cuobj parameter.

If the attribute is found in the CuAt object class and its value (as given in the cuobj parameter) is to be changed back to the default value for this attribute, the customized object is deleted. Otherwise, the customized object is simply updated.

If the attribute object does not already exist and its attribute value is being changed to a non-default value, a new object is added to the CuAt object class with the information given in the cuobj parameter.

Note: The putattr device configuration subroutine will fail unless you first call the odm_initialize subroutine.

Return Values

0 Indicates a successful operation.
-1 Indicates a failed operation.


/usr/lib/libcfg.a Archive of device configuration subroutines.

Implementation Specifics

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

Related Information

The odm_initialize subroutine, the getattr device configuration subroutine.

List of Device Configuration Subroutines.

Customized Attribute (CuAt) object class.

Device Configuration Subsystem Programming Introduction in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.

Object Data Manager (ODM) Overview for Programmers in AIX General Programming Concepts: Writing and Debugging Programs.

[ Previous | Next | Contents | Home | Search ]