Drop sensors option -U, --hide-unknown. libsensors no longer exposes

chips with no features, and it builds the features list dynamically, so
applications no longer get to see unknown chips.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4697 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2007-08-22 18:43:48 +00:00
1 parent a30d37899f
commit 90c2942bef
3 files changed
+5 -20

No files matched your search

+1
View File
@@ -50,6 +50,7 @@ SVN HEAD
Update URI
Program sensors: Drop all the chip-specific support
Fix alignment of alarm for one-limit temperatures
Drop option -U
Program sensors-detect: Stop Super-I/O probe after first family success
Fix SMSC DME1737 detection
Add /usr/sbin to the PATH (#2199)
+2 -11
View File
@@ -54,7 +54,7 @@ static const char *sprintf_chip_name(const sensors_chip_name *name);
#define CHIPS_MAX 20
sensors_chip_name chips[CHIPS_MAX];
int chips_count=0;
int do_sets, do_unknown, fahrenheit, hide_adapter, hide_unknown;
int do_sets, do_unknown, fahrenheit, hide_adapter;
char degstr[5]; /* store the correct string to print degrees */
@@ -71,7 +71,6 @@ void print_long_help(void)
printf(" -s, --set Execute `set' statements too (root only)\n");
printf(" -f, --fahrenheit Show temperatures in degrees fahrenheit\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");
printf(" -v, --version Display the program version\n");
printf("\n");
@@ -156,7 +155,6 @@ int main (int argc, char *argv[])
{ "version", no_argument, NULL, 'v'},
{ "fahrenheit", no_argument, NULL, 'f' },
{ "no-adapter", no_argument, NULL, 'A' },
{ "no-unknown", no_argument, NULL, 'U' },
{ "config-file", required_argument, NULL, 'c' },
{ "unknown", no_argument, NULL, 'u' },
{ 0,0,0,0 }
@@ -167,9 +165,8 @@ int main (int argc, char *argv[])
do_unknown = 0;
do_sets = 0;
hide_adapter = 0;
hide_unknown = 0;
while (1) {
c = getopt_long(argc, argv, "hsvfAUc:u", long_opts, NULL);
c = getopt_long(argc, argv, "hsvfAc:u", long_opts, NULL);
if (c == EOF)
break;
switch(c) {
@@ -195,9 +192,6 @@ int main (int argc, char *argv[])
case 'A':
hide_adapter = 1;
break;
case 'U':
hide_unknown = 1;
break;
case 'u':
do_unknown = 1;
break;
@@ -306,9 +300,6 @@ const char *sprintf_chip_name(const sensors_chip_name *name)
void do_a_print(const sensors_chip_name *name)
{
if (hide_unknown)
return;
printf("%s\n",sprintf_chip_name(name));
if (!hide_adapter) {
const char *adap = sensors_get_adapter_name(&name->bus);
+2 -9
View File
@@ -1,4 +1,5 @@
.\" Copyright 1999 Frodo Looijaard <frodol@dds.nl>
.\" Copyright (C) 2007 Jean Delvare <khali@linux-fr.org>
.\" sensors is distributed under the GPL
.\"
.\" Permission is granted to make and distribute verbatim copies of this
@@ -21,7 +22,7 @@
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.TH sensors 1 "October 2006" "" "Linux User's Manual"
.TH sensors 1 "August 2007" "" "Linux User's Manual"
.SH NAME
sensors \- print sensors information
.SH SYNOPSIS
@@ -44,12 +45,6 @@ is used to show the current readings of all sensor chips.
.B sensors -s
is used to set all limits as specified in the configuration file.
.B sensors
knows about certain chips, and outputs nicely formatted readings for them; but
it can also display the information of unknown chips, as long as
.I libsensors
knows about them.
.SH OPTIONS
.IP "-c config-file"
Specify a configuration file. If no file is specified, `/etc/sensors.conf'
@@ -63,8 +58,6 @@ be `root' to do this. If this parameter is not specified, no `set' statement
is evaluated.
.IP -A
Do not show the adapter for each chip.
.IP -U
Hide unknown chips.
.IP -u
Treat all chips as unknown ones. Output will be of much lower quality;
this option is only added for testing purposes.