aboutsummaryrefslogtreecommitdiff
path: root/modules/devices/dmi.c
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2018-10-13 17:09:19 -0500
committerLeandro A. F. Pereira <leandro@hardinfo.org>2019-05-25 14:23:16 -0700
commitad57a3f7fe910cf509485e8b394007ce397df0ad (patch)
tree12568bca94348131c2abdd2e5a0485de1f8ef632 /modules/devices/dmi.c
parentf5cee38e1bdc678e8271c3eb91b827036e67d4de (diff)
Allow DMI on non-x86
There's nothing preventing this from running on non-x86. If it is not available it will just say so, like PCI. Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/devices/dmi.c')
-rw-r--r--modules/devices/dmi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/devices/dmi.c b/modules/devices/dmi.c
index 31b0c43d..0f8af169 100644
--- a/modules/devices/dmi.c
+++ b/modules/devices/dmi.c
@@ -153,8 +153,11 @@ void __scan_dmi()
dmi_ok = dmi_get_info();
if (!dmi_ok) {
- dmi_info = g_strdup("[No DMI information]\n"
- "There was an error retrieving the information.=\n"
- "Please try running HardInfo as root.=\n");
+ dmi_info = g_strdup_printf("[%s]\n%s=\n",
+ _("DMI Unavailable"),
+ (getuid() == 0)
+ ? _("DMI is not avaliable. Perhaps this platform does not provide DMI.")
+ : _("DMI is not available; Perhaps try running HardInfo as root.") );
+
}
}