HomeFreeBSD

MFC r351813, r352092: bectl(8) list sorting

Description

MFC r351813, r352092: bectl(8) list sorting

MFC r351813: bectl(8): implement sorting for 'bectl list' output

Allow 'bectl list' to sort output by a given property name. The property
name is passed in using a command-line flag, '-c' for ascending order and
'-C' for descending order. The properties allowed to sort by are:

  • name (the default output, even if '-c' or '-C' are not used)
  • creation
  • origin
  • used
  • usedds
  • usedsnap
  • usedrefreserv

The default output for 'bectl list' is now ascending alphabetical order of
BE name.

To sort by creation time from earliest to latest, the command would be
'bectl list -c creation'

MFC r352092: bectl(8): initialize reverse earlier

This turns into a warning in GCC 4.2 that 'reverse' may be used
uninitialized in this function. While I don't immediately see where it's
deciding this from (there's only two paths that make column != NULL, and
they both set reverse), initializing reverse earlier is good for clarity.

Details

Provenance
kevansAuthored on
Parents
rS352343: Update the nfsstats structure.
Branches
Unknown
Tags
Unknown