diff options
author | Burt P <pburt0@gmail.com> | 2019-07-06 15:22:26 -0500 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2019-07-10 12:24:36 -0700 |
commit | 754a87070910c336c7f62074aeac587374f85403 (patch) | |
tree | 513b0b5c0dc3778c9f4ea66abcc32bf8dffb8aa3 /hardinfo/info.c | |
parent | 70dfa900d53588dfda6fd1e12a47d9313e89c413 (diff) |
computer/os: Ubuntu flavors
See: https://github.com/lpereira/hardinfo/issues/404
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'hardinfo/info.c')
-rw-r--r-- | hardinfo/info.c | 14 |
1 files changed, 14 insertions, 0 deletions
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); } } |