Changeset 4362
- Timestamp:
- 04/09/07 16:43:29 (6 years ago)
- Location:
- lm-sensors/branches/lm-sensors-3.0.0/prog/sensors
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/branches/lm-sensors-3.0.0/prog/sensors/Module.mk
r2604 r4362 28 28 # defined value verbatim into the command-list of rules... 29 29 PROGSENSORSTARGETS := $(MODULE_DIR)/sensors 30 PROGSENSORSSOURCES := $(MODULE_DIR)/main.c $(MODULE_DIR)/chips.c 30 PROGSENSORSSOURCES := $(MODULE_DIR)/main.c $(MODULE_DIR)/chips.c $(MODULE_DIR)/chips_generic.c 31 31 32 32 # Include all dependency files. We use '.rd' to indicate this will create -
lm-sensors/branches/lm-sensors-3.0.0/prog/sensors/main.c
r4357 r4362 35 35 #include "chips.h" 36 36 #include "version.h" 37 #include "chips_generic.h" 37 38 38 39 #define PROGRAM "sensors" … … 55 56 sensors_chip_name chips[CHIPS_MAX]; 56 57 int chips_count=0; 57 int do_sets, do_unknown, fahrenheit, hide_adapter, hide_unknown ;58 int do_sets, do_unknown, fahrenheit, hide_adapter, hide_unknown, do_generic; 58 59 59 60 char degstr[5]; /* store the correct string to print degrees */ … … 75 76 printf(" -u, --unknown Treat chips as unknown ones (testing only)\n"); 76 77 printf(" -v, --version Display the program version\n"); 78 printf(" -g, --generic Use generic printing routine for all chips (testing only)\n"); 77 79 printf("\n"); 78 80 printf("Use `-' after `-c' to read the config file from stdin.\n"); … … 162 164 /* next option accepted for compatibility, but otherwise ignored */ 163 165 { "algorithm", no_argument, NULL, 'a' }, 166 { "generic", no_argument, NULL, 'g'}, 164 167 { 0,0,0,0 } 165 168 }; … … 171 174 hide_adapter = 0; 172 175 hide_unknown = 0; 176 do_generic = 0; 173 177 while (1) { 174 c = getopt_long(argc,argv,"hsvfaAUc:u ",long_opts,NULL);178 c = getopt_long(argc,argv,"hsvfaAUc:ug",long_opts,NULL); 175 179 if (c == EOF) 176 180 break; … … 206 210 case 'a': 207 211 /* Ignore for compatibility */ 212 break; 213 case 'g': 214 do_generic = 1; 208 215 break; 209 216 default: … … 448 455 if (do_unknown) 449 456 print_unknown_chip(&name); 457 else if(do_generic) 458 print_generic_chip(&name); 450 459 else { 451 460 if(m->prefix == NULL) 452 print_ unknown_chip(&name);461 print_generic_chip(&name); 453 462 else 454 463 m->fn(&name);
