Skip to contentSkip to conversation

libsensors error reports

PATCH New Jean Delvare 2 participants 3 messages Jun 3, 2006 – Jun 6, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libsensors error reports

Hi all,

It seems that libsensors is reporting errors in cases where there are no errors, but simply no sensors were found. This was reported by several confused users in the past few months. I think we should fix this. Proposed patch below, comments welcome. Mark, is this OK with you?

Index: lib/sysfs.c
=================================--- lib/sysfs.c (revision 4036)
+++ lib/sysfs.c (working copy)
@@ -112,7 +112,8 @@
}

if (!(devs = sysfs_get_bus_devices(bus))) {
- ret = -SENSORS_ERR_PROC;
+ if (errno)
+ ret = -SENSORS_ERR_PROC;
goto exit1;
}

@@ -142,7 +143,8 @@
}

if (!(clsdevs = sysfs_get_class_devices(cls))) {
- ret = -SENSORS_ERR_PROC;
+ if (errno)
+ ret = -SENSORS_ERR_PROC;
goto exit;
}

Signature · 1 line
Jean Delvare
#1 lore raw

PATCH 1/1 libsensors error reports

Hi Jean:

Quoted 4 lines · Jean Delvare

It seems that libsensors is reporting errors in cases where there are no errors, but simply no sensors were found. This was reported by several confused users in the past few months. I think we should fix this. Proposed patch below, comments welcome. Mark, is this OK with you?

Yes, that solves it nicely. Thanks.

Regards,

Signature · 2 lines
Mark M. Hoffman
mhoffman at lightlink.com
#2 lore raw

PATCH 1/1 libsensors error reports

In reply to Jean Delvare

Hi Mark,

Quoted 7 lines · Jean Delvare
Quoted 4 lines

It seems that libsensors is reporting errors in cases where there are no errors, but simply no sensors were found. This was reported by several confused users in the past few months. I think we should fix this. Proposed patch below, comments welcome. Mark, is this OK with you?

Yes, that solves it nicely. Thanks.

Thanks for the review, I've committed it.

Signature · 1 line
Jean Delvare