hardinfo

Check-in [0782efc2e6]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:hwmon: make sure we find sensors even if it does not start with 1 [http://murga-linux.com/puppy/viewtopic.php?p=841760#841760]
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA1:0782efc2e6408aa0b4f365e5016a55f8c2289f77
User & Date: jamesbond 2015-05-01 16:44:30
Context
2015-05-01
16:44
hwmon: make sure we find sensors even if it does not start with 1 [http://murga-linux.com/puppy/viewtopic.php?p=841760#841760] Leaf check-in: 0782efc2e6 user: jamesbond tags: trunk
2015-04-19
08:40
ARM CPU: detect name from either "Processor" or "model name" check-in: 7bbad8a228 user: jamesbond tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/devices/sensors.c.

242
243
244
245
246
247
248



249
250
251
252
253
254
255
256
				DEBUG("current sensor type=%s", sensor->friendly_name);

					for (count = sensor->begin_at;; count++) {
						path_sensor = g_strdup_printf(sensor->path_format, path_hwmon, count);
						DEBUG("should be reading from %s", path_sensor);
						if (!g_file_get_contents(path_sensor, &tmp, NULL, NULL)) {
							g_free(path_sensor);



							break;
						}

						mon = g_strdup_printf(sensor->key_format, count);
						name = get_sensor_label(mon);
						if (!g_str_equal(name, "ignore")) {
							output = h_strdup_cprintf(sensor->value_format,
													  output, name, driver,







>
>
>
|







242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
				DEBUG("current sensor type=%s", sensor->friendly_name);

					for (count = sensor->begin_at;; count++) {
						path_sensor = g_strdup_printf(sensor->path_format, path_hwmon, count);
						DEBUG("should be reading from %s", path_sensor);
						if (!g_file_get_contents(path_sensor, &tmp, NULL, NULL)) {
							g_free(path_sensor);
							if (count<256)
								continue; // brute-force find all
							else
								break; 
						}

						mon = g_strdup_printf(sensor->key_format, count);
						name = get_sensor_label(mon);
						if (!g_str_equal(name, "ignore")) {
							output = h_strdup_cprintf(sensor->value_format,
													  output, name, driver,