projects
/
psensor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
normalize include
[psensor.git]
/
src
/
lib
/
hdd_atasmart.c
diff --git
a/src/lib/hdd_atasmart.c
b/src/lib/hdd_atasmart.c
index
bd1ff4b
..
b34564e
100644
(file)
--- a/
src/lib/hdd_atasmart.c
+++ b/
src/lib/hdd_atasmart.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2010-201
3
jeanfi@gmail.com
+ * Copyright (C) 2010-201
4
jeanfi@gmail.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@
-16,6
+16,9
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
+#define _LARGEFILE_SOURCE 1
+#include "config.h"
+
#include <locale.h>
#include <libintl.h>
#define _(str) gettext(str)
#include <locale.h>
#include <libintl.h>
#define _(str) gettext(str)
@@
-32,9
+35,9
@@
#include <atasmart.h>
#include <linux/fs.h>
#include <atasmart.h>
#include <linux/fs.h>
-#include
"pio.h"
-#include
"hdd.h"
-#include
"log.h"
+#include
<pio.h>
+#include
<hdd.h>
+#include
<plog.h>
static int filter_sd(const char *p)
{
static int filter_sd(const char *p)
{
@@
-51,7
+54,7
@@
create_sensor(char *id, char *name, SkDisk *disk, int values_max_length)
s = psensor_create(id,
strdup(name),
s = psensor_create(id,
strdup(name),
- strdup(
"HDD"
),
+ strdup(
_("Disk")
),
t,
values_max_length);
t,
values_max_length);
@@
-130,8
+133,8
@@
struct psensor **hdd_psensor_list_add(struct psensor **sensors,
log_debug("hdd_psensor_list_add(hdd_atasmart) open %s", *tmp);
if (!sk_disk_open(*tmp, &disk)) {
log_debug("hdd_psensor_list_add(hdd_atasmart) open %s", *tmp);
if (!sk_disk_open(*tmp, &disk)) {
- id = malloc(strlen("
hdd at
") + strlen(*tmp) + 1);
- strcpy(id, "
hdd at
");
+ id = malloc(strlen("
atasmart
") + strlen(*tmp) + 1);
+ strcpy(id, "
atasmart
");
strcat(id, *tmp);
sensor = create_sensor(id,
strcat(id, *tmp);
sensor = create_sensor(id,