XML Output: libxo - provide single API to output TXT, XML, JSON and HTML

Alfred Perlstein bright at mu.org
Fri Aug 15 00:42:59 UTC 2014


On 8/14/14 9:40 AM, Phil Shafer wrote:
> Warner Losh writes:
>> My question for people advocating this method: Why not require all
>> commands that generate this kind of output to support a standard
>> command line option that causes the command to print nothing and
>> return 0 if it supports reporting, or anything else if it doesn't
>> (return 0 with output, or return non-zero with or without output).
> It's a chicken and egg problem.  I can't call the command with the
> option until I know that command can handle the option without
> generating an error, a core file, or rebooting the box.  Until I
> know what the command will do, I can't invoke it safely.
>
> There's also the issue of find an option that all commands are not
> using, given that I can't change options for existing commands.
>
>
I don't understand the need to query these programs for support of the 
option.

Can you explain in more detail?

-Alfred


More information about the freebsd-arch mailing list