Changeset 5638

Show
Ignore:
Timestamp:
02/10/09 21:50:16 (5 years ago)
Author:
khali
Message:

Report configuration file read errors.

Location:
lm-sensors/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r5637 r5638  
    1010              Skip non-file sysfs entries for speed 
    1111              Fix memory leak in scanner when using flex 2.5.9 or later 
     12              Report configuration file read errors 
    1213  lm_sensors.init: Support new format of /etc/sysconfig/lm_sensors (#2246) 
    1314                   Drop support for kernels 2.4 and earlier 
  • lm-sensors/trunk/lib/error.c

    r5633 r5638  
    5959void sensors_default_parse_error(const char *err, int lineno) 
    6060{ 
    61         fprintf(stderr, "Error: Line %d: %s\n", lineno, err); 
     61        if (lineno) 
     62                fprintf(stderr, "Error: Line %d: %s\n", lineno, err); 
     63        else 
     64                fprintf(stderr, "Error: %s\n", err); 
    6265} 
    6366 
  • lm-sensors/trunk/lib/init.c

    r5302 r5638  
    8989                        } 
    9090                        fclose(input); 
     91                } else if (errno != ENOENT) { 
     92                        sensors_parse_error(strerror(errno), 0); 
     93                        goto exit_cleanup; 
    9194                } 
    9295        }