Re: RFE: 'btrfs' tools machine readable output

2016-05-31 Thread Austin S. Hemmelgarn
On 2016-05-27 15:47, Nicholas D Steeves wrote: On 16 May 2016 at 08:39, Austin S. Hemmelgarn wrote: On 2016-05-16 08:14, Richard W.M. Jones wrote: It would be really helpful if the btrfs tools had a machine-readable output. With machine-readable output, there'd be a flag which would change th

Re: RFE: 'btrfs' tools machine readable output

2016-05-27 Thread Nicholas D Steeves
On 16 May 2016 at 08:39, Austin S. Hemmelgarn wrote: > On 2016-05-16 08:14, Richard W.M. Jones wrote: >> >> It would be really helpful if the btrfs tools had a machine-readable >> output. >> With machine-readable output, there'd be a flag which would >> change the output. eg: >> $ btrfs --json fi

Re: RFE: 'btrfs' tools machine readable output

2016-05-17 Thread David Sterba
On Tue, May 17, 2016 at 02:32:14PM +0100, Richard W.M. Jones wrote: > As I said I don't have any particular favourite format. However I'll > just point you to the code that qemu uses (basically open-coding) to > write json: > > http://git.qemu.org/?p=qemu.git;a=blob;f=qobject/qjson.c;h=ef160d2119

Re: RFE: 'btrfs' tools machine readable output

2016-05-17 Thread Richard W.M. Jones
As I said I don't have any particular favourite format. However I'll just point you to the code that qemu uses (basically open-coding) to write json: http://git.qemu.org/?p=qemu.git;a=blob;f=qobject/qjson.c;h=ef160d2119eb18aa917b71b40e37d54880b1ac7f;hb=HEAD#l83 Hopefully this is useful as a data

Re: RFE: 'btrfs' tools machine readable output

2016-05-17 Thread Austin S. Hemmelgarn
On 2016-05-17 08:23, David Sterba wrote: On Tue, May 17, 2016 at 07:14:12AM -0400, Austin S. Hemmelgarn wrote: By this example I don't mean that JSON has to be the format -- in fact it's a terrible format with all sorts of problems -- any format which is parseable with C libraries would do for u

Re: RFE: 'btrfs' tools machine readable output

2016-05-17 Thread David Sterba
On Tue, May 17, 2016 at 07:14:12AM -0400, Austin S. Hemmelgarn wrote: > >> By this example I don't mean that JSON has to be the format -- in fact > >> it's a terrible format with all sorts of problems -- any format which > >> is parseable with C libraries would do for us. > > > > My ideas was to al

Re: RFE: 'btrfs' tools machine readable output

2016-05-17 Thread Austin S. Hemmelgarn
On 2016-05-17 05:33, David Sterba wrote: On Mon, May 16, 2016 at 01:14:56PM +0100, Richard W.M. Jones wrote: I don't have time to implement this right now, so I'm just posting this as a suggestion/request ... Neither do have I, but agree with the idea and the proposed way. Here are my notes ht

Re: RFE: 'btrfs' tools machine readable output

2016-05-17 Thread David Sterba
On Mon, May 16, 2016 at 01:14:56PM +0100, Richard W.M. Jones wrote: > I don't have time to implement this right now, so I'm just posting > this as a suggestion/request ... Neither do have I, but agree with the idea and the proposed way. Here are my notes https://github.com/kdave/drafts/blob/master

Re: RFE: 'btrfs' tools machine readable output

2016-05-16 Thread Pino Toscano
On Monday 16 May 2016 14:21:07 Martin Steigerwald wrote: > Hello Richard, > > On Montag, 16. Mai 2016 13:14:56 CEST Richard W.M. Jones wrote: > > I don't have time to implement this right now, so I'm just posting > > this as a suggestion/request ... > > > > It would be really helpful if the btrfs

Re: RFE: 'btrfs' tools machine readable output

2016-05-16 Thread Richard W.M. Jones
On Mon, May 16, 2016 at 02:21:07PM +0200, Martin Steigerwald wrote: > Hello Richard, > > On Montag, 16. Mai 2016 13:14:56 CEST Richard W.M. Jones wrote: > > I don't have time to implement this right now, so I'm just posting > > this as a suggestion/request ... > > > > It would be really helpful

Re: RFE: 'btrfs' tools machine readable output

2016-05-16 Thread Austin S. Hemmelgarn
On 2016-05-16 08:14, Richard W.M. Jones wrote: I don't have time to implement this right now, so I'm just posting this as a suggestion/request ... It would be really helpful if the btrfs tools had a machine-readable output. Libguestfs parses btrfs tools output in a number of places, eg: https:/

Re: RFE: 'btrfs' tools machine readable output

2016-05-16 Thread Martin Steigerwald
Hello Richard, On Montag, 16. Mai 2016 13:14:56 CEST Richard W.M. Jones wrote: > I don't have time to implement this right now, so I'm just posting > this as a suggestion/request ... > > It would be really helpful if the btrfs tools had a machine-readable > output. > > Libguestfs parses btrfs to

RFE: 'btrfs' tools machine readable output

2016-05-16 Thread Richard W.M. Jones
I don't have time to implement this right now, so I'm just posting this as a suggestion/request ... It would be really helpful if the btrfs tools had a machine-readable output. Libguestfs parses btrfs tools output in a number of places, eg: https://github.com/libguestfs/libguestfs/blob/master/dae