master - report: implement report_for_selection
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=56846d787381e5dc90f3a3adbcc3de58154a4ed3 Commit: 56846d787381e5dc90f3a3adbcc3de58154a4ed3 Parent: 984ae7f72dee4f119eafc4e236a276a6c8a3fc95 Author: Peter Rajnoha <[email protected]> AuthorDate: Mon Dec 1 15:40:03 2014 +0100 Committer: Peter Rajnoha <[email protected]> CommitterDate: Tue Feb 10 16:06:53 2015 +0100
report: implement report_for_selection
We have 3 input report types:
- LVS (representing "_select_match_lv")
- VGS (representing "_select_match_vg")
- PVS (representing "_select_match_pv")
The input report type is saved in struct selection_handle's "orig_report_type"
variable.
However, users can use any combination of fields of different report types in selection criteria - the resulting report type can thus differ. The struct selection_handle's "report_type" variable stores this resulting report type.
The resulting report_type can end up as one of:
- LVS
- VGS
- PVS
- SEGS
- PVSEGS
This patch adds logic to report_for_selection based on (sensible) combination of orig_report_type and report_type and calls appropriate reporting functions or iterates over multiple items that need reporting to determine the selection result.
--- WHATS_NEW | 1 + tools/reporter.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 96 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.117 - ==================================== + Add infrastructure to support selection for non-reporting tools. Add LVM_COMMAND_PROFILE env var to set default command profile name to use. set CLOEXEC flag on file descriptors originating in libdaemon
tools/reporter.c +95 -1
102 lines not on this page · raw message