Changeset 4853

Show
Ignore:
Timestamp:
09/23/07 15:48:52 (7 years ago)
Author:
khali
Message:

Better error message if configuration file can't be loaded.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/prog/sensord/lib.c

    r4828 r4853  
    8080    if (!reload) { 
    8181      if ((ret = sensors_init (stdin))) { 
    82         if (ret == -SENSORS_ERR_PROC) 
    83           sensorLog (LOG_ERR, "Error reading /proc or /sys; modules probably not loaded"); 
    84         else 
    85           sensorLog (LOG_ERR, "Error %d loading sensors configuration file: <stdin>", ret); 
     82        sensorLog (LOG_ERR, "Error loading sensors configuration file <stdin>: %s", 
     83                   sensors_strerror (ret)); 
    8684        ret = 12; 
    8785      } 
     
    9997      ret = 11; 
    10098    } else if ((ret = sensors_init (cfg))) { 
    101       if (ret == -SENSORS_ERR_PROC) 
    102         sensorLog (LOG_ERR, "Error reading /proc or /sys; modules probably not loaded"); 
    103       else 
    104         sensorLog (LOG_ERR, "Error %d loading sensors configuration file: %s", ret, cfgPath); 
     99      sensorLog (LOG_ERR, "Error loading sensors configuration file %s: %s", 
     100                 cfgPath, sensors_strerror (ret)); 
    105101      ret = 11; 
    106102    } else {