From 97660cb42a83eb3ffc15c99539c7d72b7f2b8f5d Mon Sep 17 00:00:00 2001 From: Nicolai Dagestad Date: Sun, 6 Jun 2021 18:28:35 +0200 Subject: [PATCH] rfkill: Set scols table name to make the json output valid [kzak@redhat.com: - s/rfkill/rfkilldevices/] Fixes: https://github.com/karelzak/util-linux/issues/1339 Signed-off-by: Nicolai Dagestad Signed-off-by: Karel Zak --- sys-utils/rfkill.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys-utils/rfkill.c b/sys-utils/rfkill.c index 0e740e122..da9b07ec4 100644 --- a/sys-utils/rfkill.c +++ b/sys-utils/rfkill.c @@ -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);