From owner-svn-src-all@freebsd.org Wed Nov 2 17:33:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E0BAC2CC05; Wed, 2 Nov 2016 17:33:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCA141C43; Wed, 2 Nov 2016 17:33:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uA2HXMd4016890; Wed, 2 Nov 2016 17:33:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uA2HXM0A016889; Wed, 2 Nov 2016 17:33:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611021733.uA2HXM0A016889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 2 Nov 2016 17:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r308223 - vendor/illumos/dist/lib/libnvpair X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2016 17:33:24 -0000 Author: avg Date: Wed Nov 2 17:33:22 2016 New Revision: 308223 URL: https://svnweb.freebsd.org/changeset/base/308223 Log: 5752 dump_nvlist() is not aware of boolean array illumos/illumos-gate@ee3c499ad1e4fc884a11b2bc6490787b788bf84a https://github.com/illumos/illumos-gate/commit/ee3c499ad1e4fc884a11b2bc6490787b788bf84a 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 Reviewed by: Matthew Ahrens Reviewed by: Will Andrews Approved by: Robert Mustacchi Author: Andriy Gapon Modified: vendor/illumos/dist/lib/libnvpair/libnvpair.c Modified: vendor/illumos/dist/lib/libnvpair/libnvpair.c ============================================================================== --- vendor/illumos/dist/lib/libnvpair/libnvpair.c Wed Nov 2 17:32:31 2016 (r308222) +++ vendor/illumos/dist/lib/libnvpair/libnvpair.c Wed Nov 2 17:33:22 2016 (r308223) @@ -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;