Date: Wed, 03 Dec 2014 13:51:06 +0100 From: Stefan Esser <se@freebsd.org> To: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Cc: phil Shafer <phil@juniper.net>, "Simon J. Gerraty" <sjg@juniper.net> Subject: [Review] pciconf converted to use libxo [D1206] Message-ID: <547F073A.2090502@freebsd.org>
next in thread | raw e-mail | index | archive | help
Hi all, the following review URL shows my proposed changes to make pciconf optionally output XML or JSON formatted data via libxo: https://reviews.freebsd.org/D1206 I wanted to see how much effort the conversion of a utility that was not written with libxo in mind makes - and I'm pleased by the possibility to mostly mechanically replace printf/err/warn calls with their libxo counterparts. The documentation of libxo seems incomplete (e.g. no mention of xo_error() that I could find), and some functions do not seem to produce the expected result (xo_err() prints the message as given in the format string, but does not automatically append strerror() as err() does ...). A FreeBSD man-page that lists all functions and that can be used as a reference when libxo principles are already known would be really great. ;-) Since the behaviour of pciconf has not changed unless invoked with "--libxo", I could check in this version without worrying about a violation of POLA. But I thought I might learn how to use Phabricator and offer an opportunity to comment on proposed XML/JSON tags or my general use of libxo features ... Please let me know whether these is something wrong in the XML or JSON output (bad tags names, bad use of xo_ functions to generate the output, ...). The HTML-Output looks ugly if directly viewed in a web browser, but that's not different than what other utilities converted to use libxo produce ... Regards, STefan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?547F073A.2090502>