summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2022-08-04 16:42:54 +0200
committerPeter Rajnoha <prajnoha@redhat.com>2022-08-11 11:10:11 +0200
commit6cba28a335284de9dd68d84b4dd660f6e744eba5 (patch)
tree1d0406c6e4555b4e1f322876a840783d2a1ff93d /tools
parent73ec3c954b21522352b6f5cce9a700d6bf30ccf4 (diff)
downloadlvm2-6cba28a335284de9dd68d84b4dd660f6e744eba5.tar.gz
config: recognize 'json_std' for report/output_format config setting
Diffstat (limited to 'tools')
-rw-r--r--tools/reporter.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/reporter.c b/tools/reporter.c
index eafba4fec..b31f1891e 100644
--- a/tools/reporter.c
+++ b/tools/reporter.c
@@ -1455,6 +1455,7 @@ int devtypes(struct cmd_context *cmd, int argc, char **argv)
#define REPORT_FORMAT_NAME_BASIC "basic"
#define REPORT_FORMAT_NAME_JSON "json"
+#define REPORT_FORMAT_NAME_JSON_STD "json_std"
int report_format_init(struct cmd_context *cmd)
{
@@ -1475,11 +1476,14 @@ int report_format_init(struct cmd_context *cmd)
: DM_REPORT_GROUP_SINGLE;
} else if (!strcmp(format_str, REPORT_FORMAT_NAME_JSON)) {
args.report_group_type = DM_REPORT_GROUP_JSON;
+ } else if (!strcmp(format_str, REPORT_FORMAT_NAME_JSON_STD)) {
+ args.report_group_type = DM_REPORT_GROUP_JSON_STD;
} else {
log_error("%s: unknown report format.", format_str);
- log_error("Supported report formats: %s, %s.",
+ log_error("Supported report formats: %s, %s, %s.",
REPORT_FORMAT_NAME_BASIC,
- REPORT_FORMAT_NAME_JSON);
+ REPORT_FORMAT_NAME_JSON,
+ REPORT_FORMAT_NAME_JSON_STD);
return 0;
}