mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-10 16:30:50 +00:00
Relabel "sensors -u" from "unknown chip" to "raw chip". sensors uses generic
code to display all the chips now so the notion of "unknown chip" no longer exists, however this raw output format can still be useful for debugging. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4698 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
90c2942bef
commit
bf1ff10ab4
4 files changed
+9
-11
No files matched your search
@@ -99,7 +99,7 @@ void print_vid_info(const sensors_chip_name *name, int f_vid, int label_size)
|
||||
free(label);
|
||||
}
|
||||
|
||||
void print_unknown_chip(const sensors_chip_name *name)
|
||||
void print_chip_raw(const sensors_chip_name *name)
|
||||
{
|
||||
int a;
|
||||
const sensors_feature_data *data;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "lib/sensors.h"
|
||||
|
||||
extern void print_unknown_chip(const sensors_chip_name *name);
|
||||
extern void print_chip_raw(const sensors_chip_name *name);
|
||||
|
||||
/* some functions used by chips_generic.c */
|
||||
#define HYST 0
|
||||
|
||||
+6
-7
@@ -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;
|
||||
int do_sets, do_raw, fahrenheit, hide_adapter;
|
||||
|
||||
char degstr[5]; /* store the correct string to print degrees */
|
||||
|
||||
@@ -71,7 +71,7 @@ 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, --unknown Treat chips as unknown ones (testing only)\n");
|
||||
printf(" -u Raw output (debugging only)\n");
|
||||
printf(" -v, --version Display the program version\n");
|
||||
printf("\n");
|
||||
printf("Use `-' after `-c' to read the config file from stdin.\n");
|
||||
@@ -156,13 +156,12 @@ int main (int argc, char *argv[])
|
||||
{ "fahrenheit", no_argument, NULL, 'f' },
|
||||
{ "no-adapter", no_argument, NULL, 'A' },
|
||||
{ "config-file", required_argument, NULL, 'c' },
|
||||
{ "unknown", no_argument, NULL, 'u' },
|
||||
{ 0,0,0,0 }
|
||||
};
|
||||
|
||||
setlocale(LC_CTYPE, "");
|
||||
|
||||
do_unknown = 0;
|
||||
do_raw = 0;
|
||||
do_sets = 0;
|
||||
hide_adapter = 0;
|
||||
while (1) {
|
||||
@@ -193,7 +192,7 @@ int main (int argc, char *argv[])
|
||||
hide_adapter = 1;
|
||||
break;
|
||||
case 'u':
|
||||
do_unknown = 1;
|
||||
do_raw = 1;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"Internal error while parsing options!\n");
|
||||
@@ -308,8 +307,8 @@ void do_a_print(const sensors_chip_name *name)
|
||||
else
|
||||
fprintf(stderr, "Can't get adapter name\n");
|
||||
}
|
||||
if (do_unknown)
|
||||
print_unknown_chip(name);
|
||||
if (do_raw)
|
||||
print_chip_raw(name);
|
||||
else
|
||||
print_generic_chip(name);
|
||||
printf("\n");
|
||||
|
||||
@@ -59,8 +59,7 @@ is evaluated.
|
||||
.IP -A
|
||||
Do not show the adapter for each chip.
|
||||
.IP -u
|
||||
Treat all chips as unknown ones. Output will be of much lower quality;
|
||||
this option is only added for testing purposes.
|
||||
Raw output. This mode is only meant for debugging.
|
||||
.IP -v
|
||||
Print the program version and exit.
|
||||
.IP -f
|
||||
|
||||
Reference in new issue
Block a user