On 01/02/2013 10:30, Hugo Mills wrote:
On Fri, Feb 01, 2013 at 09:59:49AM +0000, Audrius Butkevicius wrote:
Add '-b' and '--bytes' options to btrfs filesystem df and show, for easier
integration with scripts. This causes all sizes to be displayed in decimal
bytes instead of pretty-printed with human-readable suffices KB, MB, etc.
Please, not this way.
Hi Hugo,
Just wanted to check which approach you'd prefer to see me adopt:
1. Providing an option which is handled near the entry point (prior
going to commands), which would toggle a global flag to indicate the
format.
2. An option in every function which uses pretty sizes. (Though -B seems
to be used by scrub, -b is used by calc-size and mkfs utils, -u is used
by subvolume list and so on, meaning the option might have to be
different for different commands)
3. An environment variable BTRFS_UNITS, which when set to b[ytes],
changes the behaviour of pretty printing. Avoids having to touch the
multiple sets of ad-hoc option parsing code, but is perhaps a slightly
non-standard interface.
Thanks,
Audrius.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html