svn commit: r282752 - stable/9/cddl/contrib/opensolaris/lib/libnvpair
Andriy Gapon
avg at FreeBSD.org
Mon May 11 08:31:40 UTC 2015
Author: avg
Date: Mon May 11 08:31:39 2015
New Revision: 282752
URL: https://svnweb.freebsd.org/changeset/base/282752
Log:
MFC r282121: dump_nvlist: handle DATA_TYPE_BOOLEAN_ARRAY
Modified:
stable/9/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c
Directory Properties:
stable/9/cddl/contrib/opensolaris/lib/libnvpair/ (props changed)
Modified: stable/9/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Mon May 11 08:30:57 2015 (r282751)
+++ stable/9/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Mon May 11 08:31:39 2015 (r282752)
@@ -793,6 +793,7 @@ dump_nvlist(nvlist_t *list, int indent)
{
nvpair_t *elem = NULL;
boolean_t bool_value;
+ boolean_t *bool_array_value;
nvlist_t *nvlist_value;
nvlist_t **nvlist_array_value;
uint_t i, count;
@@ -853,6 +854,16 @@ dump_nvlist(nvlist_t *list, int indent)
NVP(elem, string, char *, char *, "'%s'");
break;
+ case DATA_TYPE_BOOLEAN_ARRAY:
+ (void) nvpair_value_boolean_array(elem,
+ &bool_array_value, &count);
+ for (i = 0; i < count; i++) {
+ (void) printf("%*s%s[%d]: %s\n", indent, "",
+ nvpair_name(elem), i,
+ bool_array_value[i] ? "true" : "false");
+ }
+ break;
+
case DATA_TYPE_BYTE_ARRAY:
NVPA(elem, byte_array, uchar_t, int, "%u");
break;
More information about the svn-src-stable-9
mailing list