summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2017-06-29 11:07:54 +0200
committerKarel Zak2017-06-29 11:07:54 +0200
commite8fd8c6b9bf53e646b84ae28b123379752fbd3c2 (patch)
treeb6c2965ec57ddb5b15de819700b5d0f43a5f9367
parentwipefs: try another magic strings on -o and -t (diff)
downloadkernel-qcow2-util-linux-e8fd8c6b9bf53e646b84ae28b123379752fbd3c2.tar.gz
kernel-qcow2-util-linux-e8fd8c6b9bf53e646b84ae28b123379752fbd3c2.tar.xz
kernel-qcow2-util-linux-e8fd8c6b9bf53e646b84ae28b123379752fbd3c2.zip
uuidparse: se JSON table name on -J
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--misc-utils/uuidparse.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/misc-utils/uuidparse.c b/misc-utils/uuidparse.c
index d9dba493a..400775e00 100644
--- a/misc-utils/uuidparse.c
+++ b/misc-utils/uuidparse.c
@@ -258,7 +258,10 @@ static void print_output(struct control const *const ctrl, int argc,
if (!tb)
err(EXIT_FAILURE, _("failed to allocate output table"));
- scols_table_enable_json(tb, ctrl->json);
+ if (ctrl->json) {
+ scols_table_enable_json(tb, 1);
+ scols_table_set_name(tb, "uuids");
+ }
scols_table_enable_noheadings(tb, ctrl->no_headings);
scols_table_enable_raw(tb, ctrl->raw);