DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

cm_addval(D3)


cm_addval -- add an entry to the resource manager database

Synopsis

   #include <sys/confmgr.h>
   #include <sys/ddi.h>
   

int cm_addval(cm_args_t *args);

Description

cm_addval is used to append a value to the specified (key, param) pair in the resource manager database.

Arguments


args
Structure containing request arguments.

Return values

cm_addval returns 0 for success. The following errnos are returned for failure:

EINVAL
if args is NULL, cm_key is invalid, cm_vallen is zero, cm_param is NULL, or cm_param specifies a read-only parameter.

Usage

The cm_key and cm_param elements of the args structure should be set to select the (key, param) pair to which a value is to be appended. The cm_val element of args should be set to point to the value and cm_len should be set to the length (in bytes) of cm_val.

cm_addval( ) does not replace existing values of the (key, param) pair, but rather appends to the existing list of values, if any. If you want to replace an existing value, first call the cm_delval( ) function to delete the existing values.

cm_addval( ) must be called as part of a read/write transaction, between calls to cm_begin_trans(D3) and cm_end_trans(D3).

Context and synchronization

User or blockable context. Initialization or Base.

Hardware applicability

All

Version applicability

ddi: 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp

Differences between versions

In DDI versions prior to version 8, cm_begin_trans(D3) and cm_end_trans(D3) are not supported. Calls to cm_addval( ) are only atomic with respect to other simultaneous resource manager database accesses.

References

cm_args(D4), config(D2)

cm_addval(D3), cm_begin_trans(D3), cm_delkey(D3), cm_delval(D3), cm_end_trans(D3), cm_newkey(D3), cm_read_devconfig(D3), cm_read_devconfig8(D3), cm_read_devconfig16(D3), cm_read_devconfig32(D3), cm_write_devconfig(D3), cm_write_devconfig8(D3), cm_write_devconfig16(D3), cm_write_devconfig32(D3) errnos(D5)

``Hotplug devices'' in HDK Technical Reference,
``Autoconfiguration'' in HDK Technical Reference


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005