Ticket #2284 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

\r in sensors.conf causes error messages

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


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

Changed 6 years ago 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?

Changed 6 years ago 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.

Changed 6 years ago 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.

Changed 6 years ago 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.

Note: See TracTickets for help on using tickets.