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)
Thu, Apr 4, 7:09 AM
Unknown Object (File)
Fri, Mar 22, 9:46 PM
Unknown Object (File)
Mar 8 2024, 1:52 PM
Unknown Object (File)
Mar 8 2024, 1:52 PM
Unknown Object (File)
Mar 8 2024, 11:24 AM
Unknown Object (File)
Jan 5 2024, 11:21 AM
Unknown Object (File)
Jan 5 2024, 11:09 AM
Unknown Object (File)
Dec 22 2023, 10:32 PM

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

Lint
Lint Skipped
Unit
No Test Coverage
Build Status
Buildable 25146
Build 23840: arc lint + arc unit

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.