[stgt] Machine readable output for tgtadm --lld [driver] --op show --mode target
fujita.tomonori at lab.ntt.co.jp
Mon Jun 8 04:31:12 CEST 2009
On Sun, 7 Jun 2009 11:52:28 +0100
Chris Webb <chris at arachsys.com> wrote:
> "Dr. Volker Jaenisch" <volker.jaenisch at inqbus.de> writes:
> > JSON you may easily use from within C (And some dozens of other languages).
> > Please have a look at http://json.org where you will find to 5 JSON
> > libraries for C.
> It is possible to parse JSON from C, but it's not anywhere near as
> convenient as a simple strsep() parser would be, and the situation from
> shell scripts is pretty bleak. Consequently, it wouldn't be my data format
> of choice for systems work, and given a choice between the current 'human
> readable' output and JSON, we'll probably just continue parsing the existing
> output as it is marginally less expensive code-wise and mean we don't pull
> in another unnecessary dependency.
> However, as I say we'd definitely see benefit from a simpler, more regular
> text format output, so if you produce an JSON-output option with an option
> syntax which extends naturally to other formats, e.g. --format=json,
> --format=brief, and so on, I'd be happy to write a supplementary patch
> adding a 'brief text' format on top.
Supporting multiple formats sounds fine to me but I have one comment
about how to implement it. I want:
tgtd -> verbose an easy-processing-for-machine format -> tgtadm ->
a format module (like human readable, brief human readable, XML, etc).
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt