Kernel Functions for Drivers nvlistaddboolean(9F)
NAME
nvlistaddboolean, nvlistaddbooleanvalue,
nvlistaddbyte, nvlistaddint8, nvlistadduint8,
nvlistaddint16, nvlistadduint16, nvlistaddint32,
nvlistadduint32, nvlistaddint64, nvlistadduint64,
nvlistaddstring, nvlistaddnvlist, nvlistaddnvpair,
nvlistaddbooleanarray, nvlistaddint8array,
nvlistadduint8array, nvlistaddnvlistarray,
nvlistaddbytearray, nvlistaddint16array,
nvlistadduint16array, nvlistaddint32array,
nvlistadduint32array, nvlistaddint64array,
nvlistadduint64array, nvlistaddstringarray, nvlistt -
value pair functions
SYNOPSIS
#include
int nvlistaddboolean(nvlistt *nvl, const char *name);
int nvlistaddbooleanvalue(nvlistt *nvl, const char *name,
booleant val);
int nvlistaddbyte(nvlistt *nvl, const char *name, uchart val);
int nvlistaddint8(nvlistt *nvl, const char *name, int8t val);
int nvlistadduint8(nvlistt *nvl, const char *name, uint8t val);
int nvlistaddint16(nvlistt *nvl, const char *name, int16t val);
int nvlistadduint16(nvlistt *nvl, const char *name, uint16t val);
int nvlistaddint32(nvlistt *nvl, const char *name, int32t val);
int nvlistadduint32(nvlistt *nvl, const char *name, uint32t val);
int nvlistaddint64(nvlistt *nvl, const char *name, int64t val);
int nvlistadduint64(nvlistt *nvl, const char *name, uint64t val);
SunOS 5.11 Last change: 16 Jan 2006 1
Kernel Functions for Drivers nvlistaddboolean(9F)
int nvlistaddstring(nvlistt *nvl, const char *name, char *val);
int nvlistaddnvlist(nvlistt *nvl, const char *name, nvlistt *val);
int nvlistaddnvpair(nvlistt *nvl, nvpairt *nvp);
int nvlistaddbooleanarray(nvlistt *nvl, const char *name,
booleant *val, uintt nelem);
int nvlistaddbytearray(nvlistt *nvl, const char *name, uchart *val,
uintt nelem);
int nvlistaddint8array(nvlistt *nvl, const char *name, int8t *val,
uintt nelem);
int nvlistadduint8array(nvlistt *nvl, const char *name,
uint8t *val uintt nelem);
int nvlistaddint16array(nvlistt *nvl, const char *name, int16t *val,
uintt nelem);
int nvlistadduint16array(nvlistt *nvl, const char *name, uint16t *val,
uintt nelem);
int nvlistaddint32array(nvlistt *nvl, const char *name, int32t *val,
uintt nelem);
int nvlistadduint32array(nvlistt *nvl, const char *name, uint32t *val,
uintt nelem);
int nvlistaddint64array(nvlistt *nvl, const char *name, int64t *val,
uintt nelem);
int nvlistadduint64array(nvlistt *nvl, const char *name, uint64t *val,
uintt nelem);
int nvlistaddstringarray(nvlistt *nvl, const char *name,
const *char *val, uintt nelem);
SunOS 5.11 Last change: 16 Jan 2006 2
Kernel Functions for Drivers nvlistaddboolean(9F)
int nvlistaddnvlistarray(nvlistt *nvl, const char *name,
nvlistt **val, uintt nelem);
INTERFACE LEVEL
Solaris DI specific (Solaris DI)
PARAMETERS
nvl The nvlistt to be processed.
nvp The nvpairt (name-value pair) to be processed.
name Name of the name-value pair (nvpair).
nelem Number of elements in value (that is, array size).
val Value or starting address of the array value.
DESCRIPTION
These functions add a new name-value pair to an nvlistt.
The memory allocation policy follows that specified in
nvlistalloc(), nvlistunpack(), or nvlistdup(). See
nvlistalloc(9F). The uniqueness of nvpair name and data
types follows the nvflag argument specified in
nvlistalloc().
If NVUNIQUENAME was specified for nvflag, existing nvpairs
with matching names are removed before the new nvpair is
added.
If NVUNIQUENAMETYPE was specified for nvflag, existing
nvpairs with matching names and data types are removed
before the new nvpair is added.
If neither was specified for nvflag, the new nvpair is
unconditionally added at the end of the list. The library
preserves the order of the name-value pairs across packing,
unpacking, and duplication.
Multiple threads can simultaneously read the same nvlistt,
but only one thread may actively change a given nvlistt at
a time. The caller is responsible for the synchronization.
SunOS 5.11 Last change: 16 Jan 2006 3
Kernel Functions for Drivers nvlistaddboolean(9F)
The nvlistaddboolean() function is deprecated and the
nvlistaddbooleanvalue() function is used instead.
RETURN VALUES
0 success
EINVAL invalid argument
ENOMEM insufficient memory
CONTEXT
These functions can be called from interrupt context only if
(1) the default allocator is used and the KMNOSLEP flag is
set, or (2) the specified allocator did not sleep for free
memory (for example, if it uses a pre-allocated buffer for
memory allocations).
See nvlistalloc(9F) for a description of pluggable alloca-
tors and KMNOSLEP. These functions can be called from user
or kernel context in all cases.
SunOS 5.11 Last change: 16 Jan 2006 4
|