On Apr 25, 2019, at 10:14 PM, J. Bruce Fields wrote: > > On Thu, Apr 25, 2019 at 02:04:59PM -0400, Jeff Layton wrote: >> More bikeshedding: should we have a "states" file instead of an "opens" >> file and print a different set of output for each stateid type? > > Sure. The format of the file could be something like > > open rw -- ... > lock r 0-EOF ... > deleg r > > I wonder if we could put owners on separate lines and do some > heirarchical thing to show owner-stateid relationships? Hm. That's > kind of appealing but more work. My suggestion here would be to use YAML-formatted output rather than space/tab separated positional fields. That can still be made human readable, but also machine parseable and extensible if formatted properly. Something like the following (use https://yaml-online-parser.appspot.com/ to validate the formatting): - : { state: open, mode: rw, owner: } - : { state: lock, mode: r, start: 0, end: EOF, owner: } > I was only planning to do opens for the first iteration, and I think > extending later in separate files is slightly safer. > > More trivial, but: it'd lengthen lines and make columns line up less > often. But if we include a lot of long variable-length fields then > that's kinda hopeless anyway. > > --b. Cheers, Andreas