Show
Ignore:
Timestamp:
02/15/09 18:24:31 (5 years ago)
Author:
khali
Message:

Keep track of configuration file names so that we can later generate
better error reports.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/lib/data.h

    r5646 r5648  
    6161} sensors_expr; 
    6262 
     63/* Config file line reference */ 
     64typedef struct sensors_config_line { 
     65        const char *filename; 
     66        int lineno; 
     67} sensors_config_line; 
     68 
    6369/* Config file label declaration: a feature name, combined with the label 
    6470   value */ 
     
    6672        char *name; 
    6773        char *value; 
    68         int lineno; 
     74        sensors_config_line line; 
    6975} sensors_label; 
    7076 
     
    7480        char *name; 
    7581        sensors_expr *value; 
    76         int lineno; 
     82        sensors_config_line line; 
    7783} sensors_set; 
    7884 
     
    8389        sensors_expr *from_proc; 
    8490        sensors_expr *to_proc; 
    85         int lineno; 
     91        sensors_config_line line; 
    8692} sensors_compute; 
    8793 
     
    8995typedef struct sensors_ignore { 
    9096        char *name; 
    91         int lineno; 
     97        sensors_config_line line; 
    9298} sensors_ignore; 
    9399 
     
    114120        int ignores_count; 
    115121        int ignores_max; 
    116         int lineno; 
     122        sensors_config_line line; 
    117123} sensors_chip; 
    118124 
     
    122128        char *adapter; 
    123129        sensors_bus_id bus; 
    124         int lineno; 
     130        sensors_config_line line; 
    125131} sensors_bus; 
    126132 
     
    133139        int subfeature_count; 
    134140} sensors_chip_features; 
     141 
     142extern char **sensors_config_files; 
     143extern int sensors_config_files_count; 
     144extern int sensors_config_files_max; 
     145 
     146#define sensors_add_config_files(el) sensors_add_array_el( \ 
     147        (el), &sensors_config_files, &sensors_config_files_count, \ 
     148        &sensors_config_files_max, sizeof(char *)) 
    135149 
    136150extern sensors_chip *sensors_config_chips;