[Patch] updated: Add JSON and XML output to pciconf (libxo support - D1206)

Phil Shafer phil at juniper.net
Mon Dec 8 21:29:29 UTC 2014


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


More information about the freebsd-hackers mailing list