From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 8 21:29:29 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AEB21EE6; Mon, 8 Dec 2014 21:29:29 +0000 (UTC) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0118.outbound.protection.outlook.com [65.55.169.118]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1CBB21F; Mon, 8 Dec 2014 21:29:28 +0000 (UTC) Received: from CO2PR05CA023.namprd05.prod.outlook.com (10.141.241.151) by BN1PR05MB440.namprd05.prod.outlook.com (10.141.58.26) with Microsoft SMTP Server (TLS) id 15.1.31.17; Mon, 8 Dec 2014 21:14:36 +0000 Received: from BN1AFFO11FD038.protection.gbl (2a01:111:f400:7c10::149) by CO2PR05CA023.outlook.office365.com (2a01:111:e400:1429::23) with Microsoft SMTP Server (TLS) id 15.1.31.17 via Frontend Transport; Mon, 8 Dec 2014 21:14:35 +0000 Received: from P-EMF03-SAC.jnpr.net (66.129.239.17) by BN1AFFO11FD038.mail.protection.outlook.com (10.58.52.242) with Microsoft SMTP Server (TLS) id 15.1.26.17 via Frontend Transport; Mon, 8 Dec 2014 21:14:34 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF03-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Mon, 8 Dec 2014 13:14:33 -0800 Received: from idle.juniper.net (idleski.juniper.net [172.25.4.26]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id sB8LEWR41410; Mon, 8 Dec 2014 13:14:32 -0800 (PST) (envelope-from phil@juniper.net) Received: from idle.juniper.net (localhost [127.0.0.1]) by idle.juniper.net (8.14.4/8.14.3) with ESMTP id sB8LEJnR056654; Mon, 8 Dec 2014 16:14:19 -0500 (EST) (envelope-from phil@idle.juniper.net) Message-ID: <201412082114.sB8LEJnR056654@idle.juniper.net> To: Stefan Esser Subject: Re: [Patch] updated: Add JSON and XML output to pciconf (libxo support - D1206) In-Reply-To: <5485D915.5060609@freebsd.org> Date: Mon, 8 Dec 2014 16:14:19 -0500 From: Phil Shafer MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:66.129.239.17; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(189002)(164054003)(199003)(21056001)(31966008)(77156002)(62966003)(450100001)(48376002)(110136001)(120916001)(68736005)(46102003)(4396001)(77096005)(107046002)(15975445007)(99396003)(97736003)(19580395003)(50466002)(69596002)(76506005)(53416004)(103666002)(84676001)(106466001)(81156004)(105596002)(6806004)(50986999)(20776003)(87936001)(64706001)(47776003)(92566001)(86362001)(54356999); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR05MB440; H:P-EMF03-SAC.jnpr.net; FPR:; SPF:SoftFail; MLV:sfv; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BN1PR05MB440; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601002); SRVR:BN1PR05MB440; X-Forefront-PRVS: 041963B986 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.17 as permitted sender) Authentication-Results: spf=softfail (sender IP is 66.129.239.17) smtp.mailfrom=phil@juniper.net; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BN1PR05MB440; X-OriginatorOrg: juniper.net X-Mailman-Approved-At: Mon, 08 Dec 2014 21:40:54 +0000 Cc: "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2014 21:29:29 -0000 Stefan Esser writes: >D1206 on reviews.freebsd.org (https://reviews.freebsd.org/D1206). Patch looks good. Some nits: The names for xo_open_list and xo_open_instance need to be identical, so: >@@ -554,9 +698,14 @@ > /* Walk the capability list. */ > express = 0; > ptr = read_config(fd, &p->pc_sel, ptr, 1); >+ xo_open_list("capabilities"); should be: xo_open_list("capability"); to match: >+ xo_open_instance("capability"); Similar for: >+ xo_open_list("extended-capabilities"); >... >+ xo_open_list("error-categories"); >... >+ xo_open_list("base-addresses"); If you turn on the warn flag, you should get these issues reported (--libox=warn). >+ xo_emit("{:name/unknown}"); Should "name" be "capibility-name", to be consistent? Add some point the printf calls need to be removed. It would be great to see some example xml, json, and html output for this command, pretty printed of course. Thanks, Phil