Skip to contentSkip to conversation

emit line number for each 'set'

PATCH New Mark M. Hoffman 2 participants 2 messages Dec 5, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 emit line number for each 'set'

Hi Jean:

You asked about this on IRC last Sunday, and unfortunately I gave you some bad information. Turns out it is trivial after all. I completely forgot about libsensors error.h.

Index: lib/access.c
=================================--- lib/access.c (revision 4253)
+++ lib/access.c (working copy)
@@ -460,6 +460,8 @@
continue;
}
if ((res = sensors_set_feature(name, feature_nr, value))) {
+ sensors_parse_error("Can't set feature.",
+ chip->sets[i].lineno);
err = res;
continue;
}

Regards,

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

PATCH 1/1 emit line number for each 'set'

Hi Mark,

Quoted 8 lines · Mark M. Hoffman

You asked about this on IRC last Sunday, and unfortunately I gave you some bad information. Turns out it is trivial after all. I completely forgot about libsensors error.h.

Index: lib/access.c
=================================> --- lib/access.c (revision 4253)
+++ lib/access.c (working copy)

Review line 467

Quoted 8 lines
(quoted diff) +2 -0
@@ -460,6 +460,8 @@
 				continue;
 			}
 			if ((res = sensors_set_feature(name, feature_nr, value))) {
+				sensors_parse_error("Can't set feature.",
+						chip->sets[i].lineno);
 				err = res;
 				continue;
 			}

Very nice. It's sort of abusing the "sensors_parse_error" name as this isn't a parse error, but I guess we don't really care. Care to apply this change to our SVN tree?

Thanks,

Signature · 1 line
Jean Delvare