From 09e206d3933ecab27678293cd4ce7505afcf1caf Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Thu, 18 Jan 2007 22:15:04 +0000 Subject: [PATCH] Suppress 'Unrecognised field' error if report field is 'help'. --- WHATS_NEW_DM | 1 + libdm/libdm-report.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index f0498a94e..3afa7ecf7 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.16 - =================================== + Suppress 'Unrecognised field' error if report field is 'help'. Add --separator and --sort to dmsetup (unused). Make alignment flag optional when specifying report fields. diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c index 3f835f0fd..c6852a9a0 100644 --- a/libdm/libdm-report.c +++ b/libdm/libdm-report.c @@ -416,8 +416,9 @@ static int _parse_options(struct dm_report *rh, const char *format) if (!_field_match(rh, ws, (size_t) (we - ws))) { _display_fields(rh); log_print(" "); - log_error("dm_report: Unrecognised field: %.*s", - (int) (we - ws), ws); + if (strcasecmp(ws, "help") && strcmp(ws, "?")) + log_error("Unrecognised field: %.*s", + (int) (we - ws), ws); return 0; } } -- 2.43.5