Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Dec 2014 16:14:19 -0500
From:      Phil Shafer <phil@juniper.net>
To:        Stefan Esser <se@freebsd.org>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: [Patch] updated: Add JSON and XML output to pciconf (libxo support - D1206)
Message-ID:  <201412082114.sB8LEJnR056654@idle.juniper.net>
In-Reply-To: <5485D915.5060609@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412082114.sB8LEJnR056654>