Page MenuHomeFreeBSD

implement sorting for 'bectl list' output
ClosedPublic

Authored by rew on Jul 1 2019, 11:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 17, 5:51 AM
Unknown Object (File)
Wed, Nov 13, 6:38 AM
Unknown Object (File)
Fri, Nov 8, 1:45 AM
Unknown Object (File)
Thu, Nov 7, 1:07 PM
Unknown Object (File)
Thu, Nov 7, 10:37 AM
Unknown Object (File)
Sat, Oct 26, 5:15 PM
Unknown Object (File)
Oct 20 2024, 10:28 AM
Unknown Object (File)
Oct 14 2024, 5:57 AM

Details

Summary

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' would now be in ascending alphabetical order.

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

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

The concept looks good, as to whether the C code is right, that's not in my bailiwick. Thank you for doing this.

This revision is now accepted and ready to land.Jul 1 2019, 4:04 PM

I'm going to commit this today with just very minor massaging to the manpage and getopt parsing to reflect that -c/-C are mutually exclusive.

I'm going to commit this today with just very minor massaging to the manpage and getopt parsing to reflect that -c/-C are mutually exclusive.

and apologies for the super long delay. =-(

This revision was automatically updated to reflect the committed changes.