From 43498b2a714b7fabd61c9a90ff7fabb910165893 Mon Sep 17 00:00:00 2001 From: Ondrej Čerman Date: Sat, 4 Jan 2020 21:18:52 +0100 Subject: firmware: switched to D-Bus --- hardinfo/info.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'hardinfo/info.c') diff --git a/hardinfo/info.c b/hardinfo/info.c index f888ddac..2d1d4159 100644 --- a/hardinfo/info.c +++ b/hardinfo/info.c @@ -431,6 +431,19 @@ gchar *info_flatten(struct Info *info) return g_string_free(values, FALSE); } +void info_remove_group(struct Info *info, guint index) +{ + struct InfoGroup *grp; + + if (index >= info->groups->len) + return; + + grp = &g_array_index(info->groups, struct InfoGroup, index); + free_group_fields(grp); + + g_array_remove_index(info->groups, index); +} + struct InfoField *info_find_field(struct Info *info, const gchar *tag, const gchar *name) { struct InfoGroup *group; struct InfoField *field; -- cgit v1.2.3