From 1a0280b31388366f28cd3c20004f1565ab2112c6 Mon Sep 17 00:00:00 2001 From: Dave Wysochanski Date: Mon, 19 Jan 2009 20:53:35 +0000 Subject: [PATCH] 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. --- libdm/libdm-report.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c index 2f8c74702..0c5ee6d70 100644 --- a/libdm/libdm-report.c +++ b/libdm/libdm-report.c @@ -491,8 +491,8 @@ 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, - unsigned report_type_only) +static int _parse_fields(struct dm_report *rh, const char *format, + unsigned report_type_only) { const char *ws; /* Word start */ const char *we = format; /* Word end */ @@ -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;