mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-18 19:30:54 +00:00
Move print_chip_raw() at the top of the file, as it is indepdendent from
all the other functions. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4724 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
9fe77731a9
commit
deb41a945d
1 file changed
+25
-25
+25
-25
@@ -27,31 +27,6 @@
|
|||||||
#include "chips.h"
|
#include "chips.h"
|
||||||
#include "lib/sensors.h"
|
#include "lib/sensors.h"
|
||||||
|
|
||||||
static inline double deg_ctof(double cel)
|
|
||||||
{
|
|
||||||
return cel * (9.0F / 5.0F) + 32.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void print_label(const char *label, int space)
|
|
||||||
{
|
|
||||||
int len = strlen(label)+1;
|
|
||||||
printf("%s:%*s", label, space - len, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void print_vid_info(const sensors_chip_name *name, int f_vid,
|
|
||||||
int label_size)
|
|
||||||
{
|
|
||||||
char *label;
|
|
||||||
double vid;
|
|
||||||
|
|
||||||
if ((label = sensors_get_label(name, f_vid))
|
|
||||||
&& !sensors_get_value(name, f_vid, &vid)) {
|
|
||||||
print_label(label, label_size);
|
|
||||||
printf("%+6.3f V\n", vid);
|
|
||||||
}
|
|
||||||
free(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
void print_chip_raw(const sensors_chip_name *name)
|
void print_chip_raw(const sensors_chip_name *name)
|
||||||
{
|
{
|
||||||
int a;
|
int a;
|
||||||
@@ -84,6 +59,31 @@ void print_chip_raw(const sensors_chip_name *name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline double deg_ctof(double cel)
|
||||||
|
{
|
||||||
|
return cel * (9.0F / 5.0F) + 32.0F;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void print_label(const char *label, int space)
|
||||||
|
{
|
||||||
|
int len = strlen(label)+1;
|
||||||
|
printf("%s:%*s", label, space - len, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void print_vid_info(const sensors_chip_name *name, int f_vid,
|
||||||
|
int label_size)
|
||||||
|
{
|
||||||
|
char *label;
|
||||||
|
double vid;
|
||||||
|
|
||||||
|
if ((label = sensors_get_label(name, f_vid))
|
||||||
|
&& !sensors_get_value(name, f_vid, &vid)) {
|
||||||
|
print_label(label, label_size);
|
||||||
|
printf("%+6.3f V\n", vid);
|
||||||
|
}
|
||||||
|
free(label);
|
||||||
|
}
|
||||||
|
|
||||||
static void sensors_get_available_features(const sensors_chip_name *name,
|
static void sensors_get_available_features(const sensors_chip_name *name,
|
||||||
const sensors_feature_data *feature,
|
const sensors_feature_data *feature,
|
||||||
int i, short *has_features,
|
int i, short *has_features,
|
||||||
|
|||||||
Reference in new issue
Block a user