Changeset 5627

Show
Ignore:
Timestamp:
01/28/09 14:10:21 (5 years ago)
Author:
khali
Message:

Fix exit code in error case (for example no sensors found.) Patch from
Andre Prendel.

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r5622 r5627  
    1616  sensors: Add support for instantaneous power sensors 
    1717           Add support for current sensors 
     18           Fix exit code in error case 
    1819  sensors.conf.8: Lots of additions and reworks 
    1920  sensors.conf.default: New, minimum version of sensors.conf.eg (#2333) 
  • lm-sensors/trunk/prog/sensors/main.c

    r5163 r5627  
    244244int main(int argc, char *argv[]) 
    245245{ 
    246         int c, res, i, error, do_bus_list; 
     246        int c, res, i, error = 0, do_bus_list; 
    247247        const char *config_file_name = NULL; 
    248248 
     
    345345exit: 
    346346        sensors_cleanup(); 
    347         exit(res); 
    348 } 
     347        exit(error); 
     348}