1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

libdm: select: recognize special selection string 'all' as an alias for blank selection string

This commit is contained in:
Peter Rajnoha 2016-06-13 15:23:44 +02:00
parent 1127b090bd
commit 5b93db6566
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.128 - Version 1.02.128 -
================================= =================================
Recognize 'all' keyword used in selection as synonym for "" (no selection).
Add dm_report_set_selection to set selection for multiple output of report. Add dm_report_set_selection to set selection for multiple output of report.
Add DM_REPORT_OUTPUT_MULTIPLE_TIMES flag for multiple output of same report. Add DM_REPORT_OUTPUT_MULTIPLE_TIMES flag for multiple output of same report.
Move field width handling/sort init from dm_report_object to dm_report_output. Move field width handling/sort init from dm_report_object to dm_report_output.

View File

@ -3984,6 +3984,8 @@ static int _alloc_rh_selection(struct dm_report *rh)
return 1; return 1;
} }
#define SPECIAL_SELECTION_ALL "all"
static int _report_set_selection(struct dm_report *rh, const char *selection, int add_new_fields) static int _report_set_selection(struct dm_report *rh, const char *selection, int add_new_fields)
{ {
struct selection_node *root = NULL; struct selection_node *root = NULL;
@ -3999,7 +4001,7 @@ static int _report_set_selection(struct dm_report *rh, const char *selection, in
goto_bad; goto_bad;
} }
if (!selection) if (!selection || !strcasecmp(selection, SPECIAL_SELECTION_ALL))
return 1; return 1;
rh->selection->add_new_fields = add_new_fields; rh->selection->add_new_fields = add_new_fields;