projects
/
psensor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
82f5a55
)
improved debug messages
author
Jean-Philippe Orsini
<jeanfi@gmail.com>
Sun, 25 Mar 2012 11:12:38 +0000
(11:12 +0000)
committer
Jean-Philippe Orsini
<jeanfi@gmail.com>
Sun, 25 Mar 2012 11:12:38 +0000
(11:12 +0000)
src/lib/hdd_atasmart.c
patch
|
blob
|
history
diff --git
a/src/lib/hdd_atasmart.c
b/src/lib/hdd_atasmart.c
index
41edfe9
..
679d874
100644
(file)
--- a/
src/lib/hdd_atasmart.c
+++ b/
src/lib/hdd_atasmart.c
@@
-69,17
+69,22
@@
static void analyze_disk(const char *dname)
f = open(dname, O_RDONLY|O_NOCTTY|O_NONBLOCK|O_CLOEXEC);
if (f < 0) {
f = open(dname, O_RDONLY|O_NOCTTY|O_NONBLOCK|O_CLOEXEC);
if (f < 0) {
- log_debug("Could not open file %s: %s", dname, strerror(errno));
+ log_debug("analyze_disk(hdd_atasmart): Could not open file %s: %s",
+ dname,
+ strerror(errno));
goto fail;
}
if (fstat(f, &st) < 0) {
goto fail;
}
if (fstat(f, &st) < 0) {
- log_debug("fstat fails %s: %s", dname, strerror(errno));
+ log_debug("analyze_disk(hdd_atasmart): fstat fails %s: %s",
+ dname,
+ strerror(errno));
goto fail;
}
if (!S_ISBLK(st.st_mode)) {
goto fail;
}
if (!S_ISBLK(st.st_mode)) {
- log_debug("!S_ISBLK fails %s", dname);
+ log_debug("analyze_disk(hdd_atasmart): !S_ISBLK fails %s",
+ dname);
goto fail;
}
goto fail;
}
@@
-132,7
+137,7
@@
struct psensor **hdd_psensor_list_add(struct psensor **sensors,
result = tmp_sensors;
} else {
result = tmp_sensors;
} else {
- log_err("sk_disk_open %s failure", *tmp);
+ log_err("sk_disk_open
(hdd_atasmart)
%s failure", *tmp);
analyze_disk(*tmp);
}
analyze_disk(*tmp);
}