diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2016-06-13 15:23:44 +0200 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2016-06-20 11:33:43 +0200 |
commit | 5b93db65660c5dbb5b68d458ffa4c034a4c37211 (patch) | |
tree | 1cfa13ffd9f0251e2043967b381571508eabcada /libdm/libdm-report.c | |
parent | 1127b090bd07065a6a5046881ba1692bd507b9da (diff) | |
download | lvm2-5b93db65660c5dbb5b68d458ffa4c034a4c37211.tar.gz |
libdm: select: recognize special selection string 'all' as an alias for blank selection string
Diffstat (limited to 'libdm/libdm-report.c')
-rw-r--r-- | libdm/libdm-report.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c index cae9c6642..1326fdf2c 100644 --- a/libdm/libdm-report.c +++ b/libdm/libdm-report.c @@ -3984,6 +3984,8 @@ static int _alloc_rh_selection(struct dm_report *rh) return 1; } +#define SPECIAL_SELECTION_ALL "all" + static int _report_set_selection(struct dm_report *rh, const char *selection, int add_new_fields) { struct selection_node *root = NULL; @@ -3999,7 +4001,7 @@ static int _report_set_selection(struct dm_report *rh, const char *selection, in goto_bad; } - if (!selection) + if (!selection || !strcasecmp(selection, SPECIAL_SELECTION_ALL)) return 1; rh->selection->add_new_fields = add_new_fields; |