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

Rename _parse_options() to _parse_fields() for naming consistency.

In libdm, we only ever use 'fields', while the tools use 'options' and
'fields' interchangeably.

Ideally it would be good to use 'fields' consistently everywhere.
However, 'options' most likely comes from the tool commandline '-o' and
'--options' which cannot be changed.
This commit is contained in:
Dave Wysochanski 2009-01-19 20:53:35 +00:00
parent 813db2c158
commit 1a0280b313

View File

@ -491,7 +491,7 @@ static int _key_match(struct dm_report *rh, const char *key, size_t len,
return 0;
}
static int _parse_options(struct dm_report *rh, const char *format,
static int _parse_fields(struct dm_report *rh, const char *format,
unsigned report_type_only)
{
const char *ws; /* Word start */
@ -562,9 +562,9 @@ struct dm_report *dm_report_init(uint32_t *report_types,
memset(rh, 0, sizeof(*rh));
/*
* rh->report_types is updated in _parse_options() and _parse_keys()
* rh->report_types is updated in _parse_fields() and _parse_keys()
* to contain all types corresponding to the fields specified by
* options or keys.
* fields or keys.
*/
if (report_types)
rh->report_types = *report_types;
@ -606,14 +606,14 @@ struct dm_report *dm_report_init(uint32_t *report_types,
* the field lists twice. The first time we only update the report type.
* FIXME Use one pass instead and expand the "all" field afterwards.
*/
if (!_parse_options(rh, output_fields, 1) ||
if (!_parse_fields(rh, output_fields, 1) ||
!_parse_keys(rh, sort_keys, 1)) {
dm_report_free(rh);
return NULL;
}
/* Generate list of fields for output based on format string & flags */
if (!_parse_options(rh, output_fields, 0) ||
if (!_parse_fields(rh, output_fields, 0) ||
!_parse_keys(rh, sort_keys, 0)) {
dm_report_free(rh);
return NULL;