2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 06:15:15 +00:00

sensors: Drop option -a (show algorithm names).

The algorithm names are no more available since Linux 2.6, and were not
very useful anyway.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4206 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare
2006-10-13 13:01:10 +00:00
parent 7891d63259
commit 4e7c982027
3 changed files with 7 additions and 17 deletions

View File

@@ -54,7 +54,7 @@ static const char *sprintf_chip_name(sensors_chip_name name);
#define CHIPS_MAX 20
sensors_chip_name chips[CHIPS_MAX];
int chips_count=0;
int do_sets, do_unknown, fahrenheit, show_algorithm, hide_adapter, hide_unknown;
int do_sets, do_unknown, fahrenheit, hide_adapter, hide_unknown;
char degstr[5]; /* store the correct string to print degrees */
@@ -70,7 +70,6 @@ void print_long_help(void)
printf(" -h, --help Display this help text\n");
printf(" -s, --set Execute `set' statements too (root only)\n");
printf(" -f, --fahrenheit Show temperatures in degrees fahrenheit\n");
printf(" -a, --algorithm Show algorithm for each chip\n");
printf(" -A, --no-adapter Do not show adapter for each chip\n");
printf(" -U, --no-unknown Do not show unknown chips\n");
printf(" -u, --unknown Treat chips as unknown ones (testing only)\n");
@@ -156,11 +155,12 @@ int main (int argc, char *argv[])
{ "set", no_argument, NULL, 's' },
{ "version", no_argument, NULL, 'v'},
{ "fahrenheit", no_argument, NULL, 'f' },
{ "algorithm", no_argument, NULL, 'a' },
{ "no-adapter", no_argument, NULL, 'A' },
{ "no-unknown", no_argument, NULL, 'U' },
{ "config-file", required_argument, NULL, 'c' },
{ "unknown", no_argument, NULL, 'u' },
/* next option accepted for compatibility, but otherwise ignored */
{ "algorithm", no_argument, NULL, 'a' },
{ 0,0,0,0 }
};
@@ -168,7 +168,6 @@ int main (int argc, char *argv[])
do_unknown = 0;
do_sets = 0;
show_algorithm = 0;
hide_adapter = 0;
hide_unknown = 0;
while (1) {
@@ -195,9 +194,6 @@ int main (int argc, char *argv[])
case 'f':
fahrenheit = 1;
break;
case 'a':
show_algorithm = 1;
break;
case 'A':
hide_adapter = 1;
break;
@@ -424,7 +420,7 @@ struct match matches[] = {
void do_a_print(sensors_chip_name name)
{
const char *algo,*adap;
const char *adap;
struct match *m;
/* do we know how to display it? */
@@ -439,11 +435,8 @@ void do_a_print(sensors_chip_name name)
adap = sensors_get_adapter_name(name.bus);
if (adap && !hide_adapter)
printf("Adapter: %s\n",adap);
algo = sensors_get_algorithm_name(name.bus);
if (algo && show_algorithm)
printf("Algorithm: %s\n",algo);
if (!algo || !adap)
printf(" ERROR: Can't get adapter or algorithm?!?\n");
if (!adap)
fprintf(stderr, "Can't get adapter name for bus %d\n", name.bus);
if (do_unknown)
print_unknown_chip(&name);
else {