diff options
author | Leandro Pereira <leandro@hardinfo.org> | 2019-06-29 19:50:15 -0700 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2019-06-29 19:51:14 -0700 |
commit | 2f4d6546de4bed086cd7acb8b6f99d68da64f02a (patch) | |
tree | 33ad417294236cbecd87a710078faa8199dd203f | |
parent | b2b1302ba44cba5b6582d329392318d2ffe6f40e (diff) |
Show Warning icon in CPU Vulnerabilities section if unmitigated
-rw-r--r-- | modules/computer.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/computer.c b/modules/computer.c index 5e81f386..3e7b9fec 100644 --- a/modules/computer.c +++ b/modules/computer.c @@ -603,9 +603,11 @@ gchar *callback_security(void) if (!contents) continue; - info_group_add_fields(vulns, - info_field(vuln, idle_free(contents)), - info_field_last()); + struct InfoField field = info_field(vuln, idle_free(contents)); + if (g_strstr_len(contents, -1, "Vulnerable")) + field = info_field_with_icon(field, "dialog-warning.png"); + + info_group_add_fields(vulns, field, info_field_last()); } g_dir_close(dir); |