projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f60c0fe
)
disk plugin: Updated after review
author
Pavel Rochnyack
<pavel2000@ngs.ru>
Wed, 31 Oct 2018 03:14:03 +0000
(10:14 +0700)
committer
Pavel Rochnyack
<pavel2000@ngs.ru>
Wed, 31 Oct 2018 09:01:55 +0000
(16:01 +0700)
src/disk.c
patch
|
blob
|
history
diff --git
a/src/disk.c
b/src/disk.c
index
41aacaa
..
7edf44c
100644
(file)
--- a/
src/disk.c
+++ b/
src/disk.c
@@
-820,7
+820,7
@@
static int disk_read(void) {
ds->poll_count = poll_count;
continue;
}
ds->poll_count = poll_count;
continue;
}
- ds->poll_count
++
;
+ ds->poll_count
= poll_count
;
if ((read_ops == 0) && (write_ops == 0)) {
DEBUG("disk plugin: ((read_ops == 0) && "
if ((read_ops == 0) && (write_ops == 0)) {
DEBUG("disk plugin: ((read_ops == 0) && "
@@
-884,14
+884,12
@@
static int disk_read(void) {
/* Disk is missing, remove it */
diskstats_t *missing_ds = ds;
/* Disk is missing, remove it */
diskstats_t *missing_ds = ds;
- if (pre_ds == disklist) {
- disklist = ds->next;
- ds = disklist;
- pre_ds = ds;
+ if (ds == disklist) {
+ pre_ds = disklist = ds->next;
} else {
pre_ds->next = ds->next;
} else {
pre_ds->next = ds->next;
- ds = ds->next;
}
}
+ ds = ds->next;
DEBUG("disk plugin: Disk %s disappeared.", missing_ds->name);
free(missing_ds->name);
DEBUG("disk plugin: Disk %s disappeared.", missing_ds->name);
free(missing_ds->name);