Changeset 1653

Show
Ignore:
Timestamp:
11/28/02 18:05:47 (10 years ago)
Author:
khali
Message:

Fix Vaio EEPROM misdetection

Files:
1 modified

Legend:

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

    r1615 r1653  
    24432443           printf("RAMBUS RIMM SPD\n"); 
    24442444           rambus = 1; 
    2445         } else 
     2445        } else if(((int) a) == 0) { 
    24462446           vaio = 1; 
     2447        } else { 
     2448           free_the_label(&label); 
     2449           return; 
     2450        } 
    24472451      } 
    24482452   } else 
     
    24502454   free_the_label(&label); 
    24512455    
    2452    if(vaio) 
    2453    { 
     2456   if(vaio) { 
     2457      /* first make sure it is a Vaio EEPROM (could still be some ddcmon) */ 
     2458      if(!sensors_get_feature(*name, SENSORS_EEPROM_ROWADDR, &a) && 
     2459       !sensors_get_feature(*name, SENSORS_EEPROM_COLADDR, &b) && 
     2460       !sensors_get_feature(*name, SENSORS_EEPROM_NUMROWS, &c)) { 
     2461        if(((int) a) != 0 || ((int) b) != 0 || ((int) c) !=0) { 
     2462           /* not a memory chip nor a Vaio EEPROM, so leave */ 
     2463           return; 
     2464        } 
     2465      } else { 
     2466        printf("ERROR: data Vaio 2\n"); 
     2467        return; 
     2468      } 
     2469   } 
     2470 
     2471   if(vaio) { 
    24542472      char buffer[33]; 
    24552473      memset(buffer, '\0', 33); 
     
    24762494         printf("%s\n", buffer); 
    24772495      } else 
    2478          printf("ERROR: data Vaio 2\n"); 
     2496         printf("ERROR: data Vaio 3\n"); 
    24792497      free_the_label(&label); 
    24802498