Show
Ignore:
Timestamp:
08/26/07 23:26:20 (6 years ago)
Author:
khali
Message:

Remove "generic" from all printing function names. This is the default
mode now so no need to mention it explicitly.
Rename print_vid_info to print_chip_vid and move it around for
consistency.

Files:
1 modified

Legend:

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

    r4726 r4728  
    6868} 
    6969 
    70 static void print_vid_info(const sensors_chip_name *name, int f_vid, 
    71                            int label_size) 
    72 { 
    73         char *label; 
    74         double vid; 
    75  
    76         if ((label = sensors_get_label(name, f_vid)) 
    77          && !sensors_get_value(name, f_vid, &vid)) { 
    78                 print_label(label, label_size); 
    79                 printf("%+6.3f V\n", vid); 
    80         } 
    81         free(label); 
    82 } 
    83  
    8470static void sensors_get_available_features(const sensors_chip_name *name, 
    8571                                           const sensors_feature_data *feature, 
     
    151137#define TEMP_FEATURE(x)         has_features[x - SENSORS_FEATURE_TEMP - 1] 
    152138#define TEMP_FEATURE_VAL(x)     feature_vals[x - SENSORS_FEATURE_TEMP - 1] 
    153 static void print_generic_chip_temp(const sensors_chip_name *name, 
    154                                     const sensors_feature_data *feature, 
    155                                     int i, int label_size) 
     139static void print_chip_temp(const sensors_chip_name *name, 
     140                            const sensors_feature_data *feature, int i, 
     141                            int label_size) 
    156142{ 
    157143        double val, limit1, limit2; 
     
    273259#define IN_FEATURE(x)           has_features[x - SENSORS_FEATURE_IN - 1] 
    274260#define IN_FEATURE_VAL(x)       feature_vals[x - SENSORS_FEATURE_IN - 1] 
    275 static void print_generic_chip_in(const sensors_chip_name *name, 
    276                                   const sensors_feature_data *feature, 
    277                                   int i, int label_size) 
     261static void print_chip_in(const sensors_chip_name *name, 
     262                          const sensors_feature_data *feature, int i, 
     263                          int label_size) 
    278264{ 
    279265        const int size = SENSORS_FEATURE_IN_MAX_ALARM - SENSORS_FEATURE_IN; 
     
    338324#define FAN_FEATURE(x)          has_features[x - SENSORS_FEATURE_FAN - 1] 
    339325#define FAN_FEATURE_VAL(x)      feature_vals[x - SENSORS_FEATURE_FAN - 1] 
    340 static void print_generic_chip_fan(const sensors_chip_name *name, 
    341                                    const sensors_feature_data *feature, 
    342                                    int i, int label_size) 
     326static void print_chip_fan(const sensors_chip_name *name, 
     327                           const sensors_feature_data *feature, int i, 
     328                          int label_size) 
    343329{ 
    344330        char *label; 
     
    391377} 
    392378 
    393 void print_generic_chip(const sensors_chip_name *name) 
     379static void print_chip_vid(const sensors_chip_name *name, int f_vid, 
     380                           int label_size) 
     381{ 
     382        char *label; 
     383        double vid; 
     384 
     385        if ((label = sensors_get_label(name, f_vid)) 
     386         && !sensors_get_value(name, f_vid, &vid)) { 
     387                print_label(label, label_size); 
     388                printf("%+6.3f V\n", vid); 
     389        } 
     390        free(label); 
     391} 
     392 
     393void print_chip(const sensors_chip_name *name) 
    394394{ 
    395395        const sensors_feature_data *feature; 
     
    405405                switch (feature->type) { 
    406406                case SENSORS_FEATURE_TEMP: 
    407                         print_generic_chip_temp(name, feature, i, label_size); 
     407                        print_chip_temp(name, feature, i, label_size); 
    408408                        break; 
    409409                case SENSORS_FEATURE_IN: 
    410                         print_generic_chip_in(name, feature, i, label_size); 
     410                        print_chip_in(name, feature, i, label_size); 
    411411                        break; 
    412412                case SENSORS_FEATURE_FAN: 
    413                         print_generic_chip_fan(name, feature, i, label_size); 
     413                        print_chip_fan(name, feature, i, label_size); 
    414414                        break; 
    415415                case SENSORS_FEATURE_VID: 
    416                         print_vid_info(name, feature->number, label_size); 
     416                        print_chip_vid(name, feature->number, label_size); 
    417417                        break; 
    418418                default: