Ticket #2284 (closed defect: fixed)

Opened 1 year ago

Last modified 7 months ago

\r in sensors.conf causes error messages

Reported by: ticket Assigned to: mmh
Priority: minor Milestone: 2.10.6
Component: libsensors Version: 2.10.5
Keywords: Cc:

Description

The presence of \r in the sensors.conf causes error messages when sensors is run. This should be easy to cure by adding \r to the BLANK list. Tyan supplied sensors.conf file for s2895 contains \r\n at the end of each line. I solved this problem of course with dos2unix after studying the source and using the test-scanner program. Otherwise everything that I have used works. Thanks for this project!

Best Wishes,

Bob Gleitsmann

Change History

02/24/08 14:23:18 changed by khali

  • owner changed from somebody to mmh.

This is a side effect of r4123. While I don't want to encourage the use of DOS-style line terminators under Linux, this feels like a regression as '\r' was treated as whitespace (i.e. silently ignored) until lm-sensors 2.10.1. Given that we are supporting '\f' and '\v' which I very much doubt anyone would include in a sensors configuration file, I guess that supporting '\r' again is acceptable. Mark, what do you think?

03/06/08 14:21:49 changed by mmh

  • status changed from new to closed.
  • resolution set to fixed.

Bob, the fix you suggested is exactly correct. Thank you.

Jean, I agree completely.

Fixed in commit r5135.

03/06/08 15:37:34 changed by khali

OK, what about branch lm-sensors-3.0.0? We should either apply the same fix there, or remove '\f' and '\v' from BLANK. If we go for the latter, we should also update sensors-conf-convert to remove the characters that are no longer considered as valid.

05/12/08 13:45:23 changed by khali

I've just applied the same fix to branch lm-sensors-3.0.0. This is the most straightforward fix and should be good enough.