usr/src/uts/common/sys/nvpair.h
changeset 11022 63ab26072e41
parent 7243 2f11e164daec
child 12979 ab9ae749152f
equal deleted inserted replaced
11021:c5323cd5fa92 11022:63ab26072e41
    17  * information: Portions Copyright [yyyy] [name of copyright owner]
    17  * information: Portions Copyright [yyyy] [name of copyright owner]
    18  *
    18  *
    19  * CDDL HEADER END
    19  * CDDL HEADER END
    20  */
    20  */
    21 /*
    21 /*
    22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
    22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
    23  * Use is subject to license terms.
    23  * Use is subject to license terms.
    24  */
    24  */
    25 
    25 
    26 #ifndef	_SYS_NVPAIR_H
    26 #ifndef	_SYS_NVPAIR_H
    27 #define	_SYS_NVPAIR_H
    27 #define	_SYS_NVPAIR_H
    28 
       
    29 #pragma ident	"%Z%%M%	%I%	%E% SMI"
       
    30 
    28 
    31 #include <sys/types.h>
    29 #include <sys/types.h>
    32 #include <sys/errno.h>
    30 #include <sys/errno.h>
    33 #include <sys/va_list.h>
    31 #include <sys/va_list.h>
    34 
    32 
   197 int nvlist_add_double(nvlist_t *, const char *, double);
   195 int nvlist_add_double(nvlist_t *, const char *, double);
   198 #endif
   196 #endif
   199 
   197 
   200 int nvlist_remove(nvlist_t *, const char *, data_type_t);
   198 int nvlist_remove(nvlist_t *, const char *, data_type_t);
   201 int nvlist_remove_all(nvlist_t *, const char *);
   199 int nvlist_remove_all(nvlist_t *, const char *);
       
   200 int nvlist_remove_nvpair(nvlist_t *, nvpair_t *);
   202 
   201 
   203 int nvlist_lookup_boolean(nvlist_t *, const char *);
   202 int nvlist_lookup_boolean(nvlist_t *, const char *);
   204 int nvlist_lookup_boolean_value(nvlist_t *, const char *, boolean_t *);
   203 int nvlist_lookup_boolean_value(nvlist_t *, const char *, boolean_t *);
   205 int nvlist_lookup_byte(nvlist_t *, const char *, uchar_t *);
   204 int nvlist_lookup_byte(nvlist_t *, const char *, uchar_t *);
   206 int nvlist_lookup_int8(nvlist_t *, const char *, int8_t *);
   205 int nvlist_lookup_int8(nvlist_t *, const char *, int8_t *);
   235 
   234 
   236 int nvlist_lookup_nvpair(nvlist_t *, const char *, nvpair_t **);
   235 int nvlist_lookup_nvpair(nvlist_t *, const char *, nvpair_t **);
   237 int nvlist_lookup_nvpair_embedded_index(nvlist_t *, const char *, nvpair_t **,
   236 int nvlist_lookup_nvpair_embedded_index(nvlist_t *, const char *, nvpair_t **,
   238     int *, char **);
   237     int *, char **);
   239 boolean_t nvlist_exists(nvlist_t *, const char *);
   238 boolean_t nvlist_exists(nvlist_t *, const char *);
       
   239 boolean_t nvlist_empty(nvlist_t *);
   240 
   240 
   241 /* processing nvpair */
   241 /* processing nvpair */
   242 nvpair_t *nvlist_next_nvpair(nvlist_t *, nvpair_t *);
   242 nvpair_t *nvlist_next_nvpair(nvlist_t *, nvpair_t *);
       
   243 nvpair_t *nvlist_prev_nvpair(nvlist_t *, nvpair_t *);
   243 char *nvpair_name(nvpair_t *);
   244 char *nvpair_name(nvpair_t *);
   244 data_type_t nvpair_type(nvpair_t *);
   245 data_type_t nvpair_type(nvpair_t *);
   245 int nvpair_type_is_array(nvpair_t *);
   246 int nvpair_type_is_array(nvpair_t *);
   246 int nvpair_value_boolean_value(nvpair_t *, boolean_t *);
   247 int nvpair_value_boolean_value(nvpair_t *, boolean_t *);
   247 int nvpair_value_byte(nvpair_t *, uchar_t *);
   248 int nvpair_value_byte(nvpair_t *, uchar_t *);