5752 dump_nvlist() is not aware of boolean array
illumos/illumos-gate@ee3c499ad1
ee3c499ad1
https://www.illumos.org/issues/5752
dump_nvlist() is not aware of the boolean array value type:
bad config type 24 for "foobar"
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>
Author: Andriy Gapon <andriy.gapon@clusterhq.com>
This commit is contained in:
parent
c01a79842c
commit
b48502fe1a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor/illumos/dist/; revision=308223
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user