mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-03 15:55: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:
1
CHANGES
1
CHANGES
@@ -10,6 +10,7 @@ SVN HEAD
|
|||||||
Program sensors: Add pc87247 support (fans only)
|
Program sensors: Add pc87247 support (fans only)
|
||||||
Hide error on missing f71805f fan
|
Hide error on missing f71805f fan
|
||||||
Handle option -c more efficiently
|
Handle option -c more efficiently
|
||||||
|
Drop option -a (show algorithm names)
|
||||||
Program sensors-detect: Add SMSC DME1737 detection
|
Program sensors-detect: Add SMSC DME1737 detection
|
||||||
Add EPoX EP1308 detection (Hans Edgington)
|
Add EPoX EP1308 detection (Hans Edgington)
|
||||||
|
|
||||||
|
@@ -54,7 +54,7 @@ static const char *sprintf_chip_name(sensors_chip_name name);
|
|||||||
#define CHIPS_MAX 20
|
#define CHIPS_MAX 20
|
||||||
sensors_chip_name chips[CHIPS_MAX];
|
sensors_chip_name chips[CHIPS_MAX];
|
||||||
int chips_count=0;
|
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 */
|
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(" -h, --help Display this help text\n");
|
||||||
printf(" -s, --set Execute `set' statements too (root only)\n");
|
printf(" -s, --set Execute `set' statements too (root only)\n");
|
||||||
printf(" -f, --fahrenheit Show temperatures in degrees fahrenheit\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(" -A, --no-adapter Do not show adapter for each chip\n");
|
||||||
printf(" -U, --no-unknown Do not show unknown chips\n");
|
printf(" -U, --no-unknown Do not show unknown chips\n");
|
||||||
printf(" -u, --unknown Treat chips as unknown ones (testing only)\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' },
|
{ "set", no_argument, NULL, 's' },
|
||||||
{ "version", no_argument, NULL, 'v'},
|
{ "version", no_argument, NULL, 'v'},
|
||||||
{ "fahrenheit", no_argument, NULL, 'f' },
|
{ "fahrenheit", no_argument, NULL, 'f' },
|
||||||
{ "algorithm", no_argument, NULL, 'a' },
|
|
||||||
{ "no-adapter", no_argument, NULL, 'A' },
|
{ "no-adapter", no_argument, NULL, 'A' },
|
||||||
{ "no-unknown", no_argument, NULL, 'U' },
|
{ "no-unknown", no_argument, NULL, 'U' },
|
||||||
{ "config-file", required_argument, NULL, 'c' },
|
{ "config-file", required_argument, NULL, 'c' },
|
||||||
{ "unknown", no_argument, NULL, 'u' },
|
{ "unknown", no_argument, NULL, 'u' },
|
||||||
|
/* next option accepted for compatibility, but otherwise ignored */
|
||||||
|
{ "algorithm", no_argument, NULL, 'a' },
|
||||||
{ 0,0,0,0 }
|
{ 0,0,0,0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -168,7 +168,6 @@ int main (int argc, char *argv[])
|
|||||||
|
|
||||||
do_unknown = 0;
|
do_unknown = 0;
|
||||||
do_sets = 0;
|
do_sets = 0;
|
||||||
show_algorithm = 0;
|
|
||||||
hide_adapter = 0;
|
hide_adapter = 0;
|
||||||
hide_unknown = 0;
|
hide_unknown = 0;
|
||||||
while (1) {
|
while (1) {
|
||||||
@@ -195,9 +194,6 @@ int main (int argc, char *argv[])
|
|||||||
case 'f':
|
case 'f':
|
||||||
fahrenheit = 1;
|
fahrenheit = 1;
|
||||||
break;
|
break;
|
||||||
case 'a':
|
|
||||||
show_algorithm = 1;
|
|
||||||
break;
|
|
||||||
case 'A':
|
case 'A':
|
||||||
hide_adapter = 1;
|
hide_adapter = 1;
|
||||||
break;
|
break;
|
||||||
@@ -424,7 +420,7 @@ struct match matches[] = {
|
|||||||
|
|
||||||
void do_a_print(sensors_chip_name name)
|
void do_a_print(sensors_chip_name name)
|
||||||
{
|
{
|
||||||
const char *algo,*adap;
|
const char *adap;
|
||||||
struct match *m;
|
struct match *m;
|
||||||
|
|
||||||
/* do we know how to display it? */
|
/* 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);
|
adap = sensors_get_adapter_name(name.bus);
|
||||||
if (adap && !hide_adapter)
|
if (adap && !hide_adapter)
|
||||||
printf("Adapter: %s\n",adap);
|
printf("Adapter: %s\n",adap);
|
||||||
algo = sensors_get_algorithm_name(name.bus);
|
if (!adap)
|
||||||
if (algo && show_algorithm)
|
fprintf(stderr, "Can't get adapter name for bus %d\n", name.bus);
|
||||||
printf("Algorithm: %s\n",algo);
|
|
||||||
if (!algo || !adap)
|
|
||||||
printf(" ERROR: Can't get adapter or algorithm?!?\n");
|
|
||||||
if (do_unknown)
|
if (do_unknown)
|
||||||
print_unknown_chip(&name);
|
print_unknown_chip(&name);
|
||||||
else {
|
else {
|
||||||
|
@@ -61,10 +61,6 @@ Print a help text and exit.
|
|||||||
Evaluate all `set' statements in the configuration file and exit. You must
|
Evaluate all `set' statements in the configuration file and exit. You must
|
||||||
be `root' to do this. If this parameter is not specified, no `set' statement
|
be `root' to do this. If this parameter is not specified, no `set' statement
|
||||||
is evaluated.
|
is evaluated.
|
||||||
.IP -a
|
|
||||||
Show the algorithm for each chip. Note that algorithms are no more named
|
|
||||||
since Linux 2.6, so this option is deprecated and will probably go away in
|
|
||||||
a near future.
|
|
||||||
.IP -A
|
.IP -A
|
||||||
Do not show the adapter for each chip.
|
Do not show the adapter for each chip.
|
||||||
.IP -U
|
.IP -U
|
||||||
|
Reference in New Issue
Block a user