Show
Ignore:
Timestamp:
01/15/00 19:59:20 (9 years ago)
Author:
mds
Message:

(mds) add bus list to help() routine, like was previously

done to i2cdump.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/prog/detect/i2cdetect.c

    r667 r697  
    2929void help(void) 
    3030{ 
     31  FILE *fptr; 
     32  char s[100]; 
     33 
    3134  fprintf(stderr,"Syntax: i2cdetect I2CBUS\n"); 
     35  fprintf(stderr,"  I2CBUS is an integer\n"); 
     36  if((fptr = fopen("/proc/bus/i2c", "r"))) { 
     37    fprintf(stderr,"  Installed I2C busses:\n"); 
     38    while(fgets(s, 100, fptr)) 
     39      fprintf(stderr, "    %s", s);      
     40    fclose(fptr); 
     41  } 
    3242} 
    3343