diff options
author | Andriy Gapon <andriy.gapon@clusterhq.com> | 2015-10-31 09:44:23 -0700 |
---|---|---|
committer | Matthew Ahrens <mahrens@delphix.com> | 2015-10-31 09:45:07 -0700 |
commit | ee3c499ad1e4fc884a11b2bc6490787b788bf84a (patch) | |
tree | a39fac3dec3bf107659448a200e8632435c078d5 /usr/src/lib/libnvpair | |
parent | 286eb3ed9ae6749df0c20c801277beae2229a179 (diff) | |
download | illumos-joyent-ee3c499ad1e4fc884a11b2bc6490787b788bf84a.tar.gz |
5752 dump_nvlist() is not aware of boolean array
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Will Andrews <will@freebsd.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/lib/libnvpair')
-rw-r--r-- | usr/src/lib/libnvpair/libnvpair.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/usr/src/lib/libnvpair/libnvpair.c b/usr/src/lib/libnvpair/libnvpair.c index c2e5a1b46d..734ec6c2f6 100644 --- a/usr/src/lib/libnvpair/libnvpair.c +++ b/usr/src/lib/libnvpair/libnvpair.c @@ -794,6 +794,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; @@ -854,6 +855,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; |