aboutsummaryrefslogtreecommitdiff
path: root/modules/devices
diff options
context:
space:
mode:
Diffstat (limited to 'modules/devices')
-rw-r--r--modules/devices/dmi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/devices/dmi.c b/modules/devices/dmi.c
index c5cad3e8..45b5e76b 100644
--- a/modules/devices/dmi.c
+++ b/modules/devices/dmi.c
@@ -90,8 +90,11 @@ gboolean dmi_get_info(void)
} else if (group && info->id_str) {
int state = 3;
- if (strcmp(info->id_str, "chassis-type") == 0)
+ if (strcmp(info->id_str, "chassis-type") == 0) {
value = dmi_chassis_type_str(-1, 1);
+ if (value == NULL)
+ state = (getuid() == 0) ? 0 : 1;
+ }
else {
switch (dmi_str_status(info->id_str)) {
case 0: