MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Name-value Pair Library Functions     nvlistaddboolean(3NVPAIR)



NAME
     nvlistaddboolean,                nvlistaddbooleanvalue,
     nvlistaddbyte,      nvlistaddint8,     nvlistadduint8,
     nvlistaddint16,    nvlistadduint16,    nvlistaddint32,
     nvlistadduint32,    nvlistaddint64,   nvlistadduint64,
     nvlistadddouble,   nvlistaddstring,   nvlistaddnvlist,
     nvlistaddnvpair,                 nvlistaddbooleanarray,
     nvlistaddbytearray,                nvlistaddint8array,
     nvlistadduint8array,              nvlistaddint16array,
     nvlistadduint16array,             nvlistaddint32array,
     nvlistadduint32array,             nvlistaddint64array,
     nvlistadduint64array,            nvlistaddstringarray,
     nvlistaddnvlistarray   -   add  new  name-value  pair  to
     nvlistt

SYNOPSIS
     cc [ flag... ] file... -lnvpair [ library... ]
     #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);



SunOS 5.11           Last change: 1 Aug 2008                    1






Name-value Pair Library Functions     nvlistaddboolean(3NVPAIR)



     int nvlistaddint64(nvlistt *nvl, const char *name,
          int64t val);


     int nvlistadduint64(nvlistt *nvl, const char *name,
          uint64t val);


     int nvlistadddouble(nvlistt *nvl, const char *name,
          double val);


     int nvlistaddstring(nvlistt *nvl, const char *name,
          const 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);






SunOS 5.11           Last change: 1 Aug 2008                    2






Name-value Pair Library Functions     nvlistaddboolean(3NVPAIR)



     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,
          char *const *val, uintt nelem);


     int nvlistaddnvlistarray(nvlistt *nvl, const char *name,
          nvlistt **val, uintt nelem);


PARAMETERS
     nvl      The nvlistt (name-value  pair  list)  to  be  pro-
              cessed.


     nvp      The nvpairt (name-value pair) to be processed.


     name     Name of the nvpair (name-value pair).


     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  uniqueness  of  nvpair  name and data types follows the
     nvflag   argument   specified   for   nvlistalloc().    See
     nvlistalloc(3NVPAIR).


     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.



SunOS 5.11           Last change: 1 Aug 2008                    3






Name-value Pair Library Functions     nvlistaddboolean(3NVPAIR)



     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 can actively change a given nvlistt at
     a time. The caller is responsible for the synchronization.


     The  nvlistaddboolean()  function   is   deprecated.   The
     nvlistaddbooleanvalue() function should be used instead.

RETURN VALUES
     These functions return 0 on success and an  error  value  on
     failure.

ERORS
     These functions will fail if:

     EINVAL    There is an invalid argument.


     ENOMEM    There is insufficient memory.


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Committed                   
    
     MT-Level                     MT-Safe                     
    


SEE ALSO
     libnvpair(3LIB), nvlistalloc(3NVPAIR), attributes(5)











SunOS 5.11           Last change: 1 Aug 2008                    4



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™