diff options
author | avg <avg@FreeBSD.org> | 2015-04-28 06:33:42 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2015-04-28 06:33:42 +0000 |
commit | 311ef80759132743196421b9bb761e62a64db477 (patch) | |
tree | 3299fb1d419a5f64f5a5c3cbe9c05da056a61b3a /cddl/contrib/opensolaris/lib/libnvpair | |
parent | fb48ac4acc73d3c6ab9b2f2f7c47ff8a1d76df31 (diff) | |
download | FreeBSD-src-311ef80759132743196421b9bb761e62a64db477.zip FreeBSD-src-311ef80759132743196421b9bb761e62a64db477.tar.gz |
dump_nvlist: handle DATA_TYPE_BOOLEAN_ARRAY
To do: upstream (https://www.illumos.org/issues/5752)
MFC after: 10 days
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libnvpair')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c b/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c index 7a265bd..7ad5141 100644 --- a/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c +++ b/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c @@ -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; |