Changeset 4819

Show
Ignore:
Timestamp:
09/19/07 17:16:14 (7 years ago)
Author:
khali
Message:

Drop support for printing unknown chips: all chips are known now.

Files:
1 modified

Legend:

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

    r4817 r4819  
    7171   
    7272  return 0; 
    73 } 
    74  
    75 static int 
    76 readUnknownChip 
    77 (const sensors_chip_name *chip) { 
    78   const sensors_feature_data *sensor; 
    79   int index0 = 0; 
    80   int ret = 0; 
    81  
    82   ret = idChip (chip); 
    83  
    84   while ((ret == 0) && ((sensor = sensors_get_all_features (chip, &index0)) != NULL)) { 
    85     char *label = NULL; 
    86     double value; 
    87      
    88     if (!(label = sensors_get_label (chip, sensor->number))) { 
    89       sensorLog (LOG_ERR, "Error getting sensor label: %s/%s", chip->prefix, sensor->name); 
    90       ret = 21; 
    91     } else if (!(sensor->flags & SENSORS_MODE_R)) { 
    92       sensorLog (LOG_INFO, "%s: %s", sensor->name, label); 
    93     } else if ((ret = sensors_get_value (chip, sensor->number, &value))) { 
    94       sensorLog (LOG_ERR, "Error getting sensor data: %s/%s: %s", chip->prefix, sensor->name, sensors_strerror (ret)); 
    95       ret = 22; 
    96     } else { 
    97       sensorLog (LOG_INFO, "  %s%s: %.2f", (sensor->mapping == SENSORS_NO_MAPPING) ? "" : "-", label, value); 
    98     } 
    99     if (label) 
    100       free (label); 
    101   } 
    102    
    103   return ret; 
    10473} 
    10574 
     
    204173      free (descriptor->features); 
    205174      free (descriptor); 
    206     } else if (action == DO_READ) 
    207       ret = readUnknownChip (chip); 
     175    } 
    208176  } 
    209177  return ret;