mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 14:25:39 +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:
@@ -27,31 +27,6 @@
|
||||
#include "chips.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)
|
||||
{
|
||||
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,
|
||||
const sensors_feature_data *feature,
|
||||
int i, short *has_features,
|
||||
|
Reference in New Issue
Block a user