From 754a87070910c336c7f62074aeac587374f85403 Mon Sep 17 00:00:00 2001 From: Burt P Date: Sat, 6 Jul 2019 15:22:26 -0500 Subject: computer/os: Ubuntu flavors See: https://github.com/lpereira/hardinfo/issues/404 Signed-off-by: Burt P --- hardinfo/info.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'hardinfo') diff --git a/hardinfo/info.c b/hardinfo/info.c index 57e67ce6..c082791b 100644 --- a/hardinfo/info.c +++ b/hardinfo/info.c @@ -35,13 +35,27 @@ struct Info *info_new(void) return info; } +void info_group_add_field(struct InfoGroup *group, struct InfoField field) +{ + if (!group) + return; + + /* info_field_last() */ + if (!field.name) + return; + + g_array_append_val(group->fields, field); +} + void info_group_add_fieldsv(struct InfoGroup *group, va_list ap) { while (1) { struct InfoField field = va_arg(ap, struct InfoField); + /* info_field_last() */ if (!field.name) break; + g_array_append_val(group->fields, field); } } -- cgit v1.2.3