]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
uuidparse: se JSON table name on -J
authorKarel Zak <kzak@redhat.com>
Thu, 29 Jun 2017 09:07:54 +0000 (11:07 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 29 Jun 2017 09:07:54 +0000 (11:07 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/uuidparse.c

index d9dba493a5b6d98dcfc5a0f48259e82fad7285ae..400775e009e134ed1762175c01b4a2d503e01930 100644 (file)
@@ -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);