]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
rfkill: Set scols table name to make the json output valid
authorNicolai Dagestad <nicolai@dagestad.fr>
Sun, 6 Jun 2021 16:28:35 +0000 (18:28 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 7 Jun 2021 08:42:02 +0000 (10:42 +0200)
[kzak@redhat.com: - s/rfkill/rfkilldevices/]

Fixes: https://github.com/karelzak/util-linux/issues/1339
Signed-off-by: Nicolai Dagestad <nicolai@dagestad.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/rfkill.c

index 0e740e122d03dbe0adfeb89350b984c0280d7f8c..da9b07ec49c38475f0be19d31ccebaca896b2e8d 100644 (file)
@@ -465,6 +465,7 @@ static void rfkill_list_init(struct control *ctrl)
                err(EXIT_FAILURE, _("failed to allocate output table"));
 
        scols_table_enable_json(ctrl->tb, ctrl->json);
+       scols_table_set_name(ctrl->tb, "rfkilldevices");
        scols_table_enable_noheadings(ctrl->tb, ctrl->no_headings);
        scols_table_enable_raw(ctrl->tb, ctrl->raw);