Show
Ignore:
Timestamp:
01/23/04 18:34:40 (9 years ago)
Author:
khali
Message:

Do not show algorithm by default.

Files:
1 modified

Legend:

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

    r2216 r2240  
    5353sensors_chip_name chips[CHIPS_MAX]; 
    5454int chips_count=0; 
    55 int do_sets, do_unknown, fahrenheit, hide_adapter, hide_unknown; 
     55int do_sets, do_unknown, fahrenheit, show_algorithm, hide_adapter, hide_unknown; 
    5656 
    5757void print_short_help(void) 
     
    6767  printf("  -s, --set             Execute `set' statements too (root only)\n"); 
    6868  printf("  -f, --fahrenheit      Show temperatures in degrees fahrenheit\n"); 
    69   printf("  -A, --no-adapter      Do not show adapter and algorithm for each chip\n"); 
     69  printf("  -a, --algorithm       Show algorithm for each chip\n"); 
     70  printf("  -A, --no-adapter      Do not show adapter for each chip\n"); 
    7071  printf("  -U, --no-unknown      Do not show unknown chips\n"); 
    7172  printf("  -u, --unknown         Treat chips as unknown ones (testing only)\n"); 
     
    159160    { "version", no_argument, NULL, 'v'}, 
    160161    { "fahrenheit", no_argument, NULL, 'f' }, 
     162    { "algorithm", no_argument, NULL, 'a' }, 
    161163    { "no-adapter", no_argument, NULL, 'A' }, 
    162164    { "no-unknown", no_argument, NULL, 'U' }, 
     
    168170  do_unknown = 0; 
    169171  do_sets = 0; 
     172  show_algorithm = 0; 
    170173  hide_adapter = 0; 
     174  hide_unknown = 0; 
    171175  while (1) { 
    172     c = getopt_long(argc,argv,"hsvfAUc:u",long_opts,NULL); 
     176    c = getopt_long(argc,argv,"hsvfaAUc:u",long_opts,NULL); 
    173177    if (c == EOF) 
    174178      break; 
     
    192196    case 'f': 
    193197      fahrenheit = 1; 
     198      break; 
     199    case 'a': 
     200      show_algorithm = 1; 
    194201      break; 
    195202    case 'A': 
     
    422429    printf("Adapter: %s\n",adap); 
    423430  algo = sensors_get_algorithm_name(name.bus); 
    424   if (algo && !hide_adapter) 
     431  if (algo && show_algorithm) 
    425432    printf("Algorithm: %s\n",algo); 
    426433  if (!algo || !adap)