[PATCH] rfkill: Set scols table name to make the json output valid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Nicolai Dagestad <nicolai@xxxxxxxxxxx>

---

Hi, I just noticed that the json input for rfkill is invalid.
The array member of the top-level object, should be named but it wasn't.
I am not familiar with the codease so I just followed what I saw in lscpu,
if another name would be prefered I can change it.

 sys-utils/rfkill.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys-utils/rfkill.c b/sys-utils/rfkill.c
index 0e740e122..41b933415 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, "rfkill");
 	scols_table_enable_noheadings(ctrl->tb, ctrl->no_headings);
 	scols_table_enable_raw(ctrl->tb, ctrl->raw);
 
-- 
2.31.1




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux