On 3/1/15 4:57 PM, Harrison Grundy wrote:
I like the idea behind this... where I'm running into difficulty is why
these bits of functionality need to be combined. What someone does with
ifconfig on the command line, versus what someone wants to know about
their network interfaces in an XML dump may be very distinct bits of
information. (For instance, an XML dump of network information may want
to incorporate data from netstat, route, and ifconfig, while ifconfig is
really only designed to deal with the interfaces themselves.)
Part of this is putting the burden of machine readable output into the utilities themselves. Meaning that people have complained against libxo because "well you can get the same information by combining data points X, Y and Z from sysctl" whereas ifconfig just does that for you. So if we split the code then those interfaces would wither and die from neglect because honestly very few core freebsd devs care about XML and JSON.

So in order to prevent bitotting and make this a "feature" of FreeBSD, we decided to put it into the base utils so that we would be sure to carry the burden and keep it working.

I know it involves some notable reworking, but would there be any
interest in seeing what "libifying" a handful of binaries and splitting
the libxo and CLI functionality looks like? It seems like this may give
FreeBSD the best of both worlds, so the XML output isn't logically
limited by how the CLI needs to work, and the CLI won't have to deal
with the complexity XML output can require.

I'd be happy to get this set up for a few binaries so people can see how
it might work and what it could look like if there's any interest in
going that route.

Please do.  That would be great.  Please make sure they are thread safe. :)

freebsd-current@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to