|
|
|
@ -101,7 +101,7 @@ static int probe(void)
|
|
|
|
|
|
|
|
|
|
/* '|/dev/sda|OCZ-VERTEX3|128|C||/dev/sdb|HDT722525DLA380|SLP|*||/dev/sdc|Generic STORAGE DEVICE|NA|*|' */
|
|
|
|
|
|
|
|
|
|
char *tok, *tmp, *resp = resp_buf;
|
|
|
|
|
char *tok, *tmp = NULL, *resp = resp_buf;
|
|
|
|
|
int i = 0;
|
|
|
|
|
char *device = NULL;
|
|
|
|
|
int temperature = 0;
|
|
|
|
@ -114,10 +114,10 @@ static int probe(void)
|
|
|
|
|
device++;
|
|
|
|
|
|
|
|
|
|
} else if ((i % 4) == 2) {
|
|
|
|
|
char *tmp;
|
|
|
|
|
char *tmp2;
|
|
|
|
|
|
|
|
|
|
temperature = strtol(tok, &tmp, 10);
|
|
|
|
|
if (*tmp != '\0')
|
|
|
|
|
temperature = strtol(tok, &tmp2, 10);
|
|
|
|
|
if (*tmp2 != '\0')
|
|
|
|
|
device = NULL;
|
|
|
|
|
|
|
|
|
|
} else if ((i % 4) == 3) {
|
|
|
|
@ -185,9 +185,9 @@ static int init(void)
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int retval = config_get_strtokens("p_hddtemp", "server", ",", 2, init_cb, NULL);
|
|
|
|
|
config_get_strtokens("p_hddtemp", "server", ",", 2, init_cb, NULL);
|
|
|
|
|
|
|
|
|
|
return (retval <= 0) ? -1 : 0;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int fini(void)
|
|
|
|
|