Fix up some nasty formatting :)

SVN revision: 37591
This commit is contained in:
Christopher Michael 2008-11-12 00:28:13 +00:00
parent 22efb68ab5
commit 513ce4e1fd
1 changed files with 41 additions and 39 deletions

View File

@ -30,8 +30,8 @@ temperature_get_bus_files(const char* bus)
{
Ecore_List *result;
Ecore_List *therms;
char path[PATH_MAX];
char busdir[PATH_MAX];
char path[PATH_MAX];
char busdir[PATH_MAX];
result = ecore_list_new();
if (result)
@ -50,8 +50,7 @@ temperature_get_bus_files(const char* bus)
/* Search each device for temp*_input, these should be
* temperature devices. */
snprintf(path, sizeof(path),
"%s/%s", busdir, name);
snprintf(path, sizeof(path),"%s/%s", busdir, name);
files = ecore_file_ls(path);
if (files)
{
@ -84,9 +83,9 @@ static void
init(void)
{
Ecore_List *therms;
char path[PATH_MAX];
char path[PATH_MAX];
#ifdef __FreeBSD__
int len;
int len;
#endif
if ((!sensor_type) || ((!sensor_name) || (sensor_name[0] == 0)))
@ -154,9 +153,9 @@ init(void)
sensor_path = strdup(name);
sensor_name = strdup(path);
printf("sensor type = i2c\n"
"sensor path = %s\n"
"sensor name = %s\n",
sensor_path, sensor_name);
"sensor path = %s\n"
"sensor name = %s\n",
sensor_path, sensor_name);
}
}
ecore_list_destroy(therms);
@ -176,16 +175,16 @@ init(void)
int len;
snprintf(path, sizeof(path),
"%s", ecore_file_file_get(name));
"%s", ecore_file_file_get(name));
len = strlen(path);
if (len > 6) path[len - 6] = '\0';
sensor_type = SENSOR_TYPE_LINUX_PCI;
sensor_path = strdup(name);
sensor_name = strdup(path);
printf("sensor type = pci\n"
"sensor path = %s\n"
"sensor name = %s\n",
sensor_path, sensor_name);
"sensor path = %s\n"
"sensor name = %s\n",
sensor_path, sensor_name);
}
}
ecore_list_destroy(therms);
@ -268,8 +267,7 @@ init(void)
break;
case SENSOR_TYPE_LINUX_ACPI:
snprintf(path, sizeof(path),
"/proc/acpi/thermal_zone/%s/temperature",
sensor_name);
"/proc/acpi/thermal_zone/%s/temperature", sensor_name);
sensor_path = strdup(path);
break;
}
@ -314,7 +312,8 @@ check(void)
{
char dummy[4096];
fgets(buf, sizeof(buf), f); buf[sizeof(buf) - 1] = 0;
fgets(buf, sizeof(buf), f);
buf[sizeof(buf) - 1] = 0;
if (sscanf(buf, "%s %s %i", dummy, dummy, &temp) == 3)
ret = 1;
else
@ -329,7 +328,8 @@ check(void)
f = fopen(sensor_path, "rb");
if (f)
{
fgets(buf, sizeof(buf), f); buf[sizeof(buf) - 1] = 0;
fgets(buf, sizeof(buf), f);
buf[sizeof(buf) - 1] = 0;
if (sscanf(buf, "%i", &temp) == 1)
ret = 1;
else
@ -383,7 +383,9 @@ check(void)
if (f)
{
char *p, *q;
fgets(buf, sizeof(buf), f); buf[sizeof(buf) - 1] = 0;
fgets(buf, sizeof(buf), f);
buf[sizeof(buf) - 1] = 0;
fclose(f);
p = strchr(buf, ':');
if (p)