mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 22:35:23 +00:00
Display stuff as Fahrenheits; patch of Kelsey Hudson
<khudson@rohan.sdsu.edu > git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@928 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -51,7 +51,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;
|
||||
int do_sets, do_unknown, fahrenheit;
|
||||
|
||||
void print_short_help(void)
|
||||
{
|
||||
@@ -64,6 +64,7 @@ void print_long_help(void)
|
||||
printf(" -c, --config-file Specify a config file\n");
|
||||
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(" -u, --unknown Treat chips as unknown ones (testing only)\n");
|
||||
printf(" -v, --version Display the program version\n");
|
||||
printf("\n");
|
||||
@@ -136,6 +137,7 @@ int main (int argc, char *argv[])
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ "set", no_argument, NULL, 's' },
|
||||
{ "version", no_argument, NULL, 'v'},
|
||||
{ "fahrenheit", no_argument, NULL, 'f' },
|
||||
{ "config-file", required_argument, NULL, 'c' },
|
||||
{ "unknown", required_argument, NULL, 'u' },
|
||||
{ 0,0,0,0 }
|
||||
@@ -144,7 +146,7 @@ int main (int argc, char *argv[])
|
||||
do_unknown = 0;
|
||||
do_sets = 0;
|
||||
while (1) {
|
||||
c = getopt_long(argc,argv,"hvusc:",long_opts,NULL);
|
||||
c = getopt_long(argc,argv,"hvufsc:",long_opts,NULL);
|
||||
if (c == EOF)
|
||||
break;
|
||||
switch(c) {
|
||||
@@ -164,6 +166,9 @@ int main (int argc, char *argv[])
|
||||
case 's':
|
||||
do_sets = 1;
|
||||
break;
|
||||
case 'f':
|
||||
fahrenheit = 1;
|
||||
break;
|
||||
case 'u':
|
||||
do_unknown = 1;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user