projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #3175 from ccin2p3/f/collectd-redhat-spec-5.9.0
[collectd.git]
/
src
/
vmem.c
diff --git
a/src/vmem.c
b/src/vmem.c
index
0d7769b
..
2ab7dda
100644
(file)
--- a/
src/vmem.c
+++ b/
src/vmem.c
@@
-26,14
+26,14
@@
#include "collectd.h"
#include "collectd.h"
-#include "common.h"
#include "plugin.h"
#include "plugin.h"
+#include "utils/common/common.h"
#if KERNEL_LINUX
static const char *config_keys[] = {"Verbose"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
#if KERNEL_LINUX
static const char *config_keys[] = {"Verbose"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
-static int verbose_output
= 0
;
+static int verbose_output;
/* #endif KERNEL_LINUX */
#else
/* #endif KERNEL_LINUX */
#else
@@
-79,10
+79,10
@@
static int vmem_config(const char *key, const char *value) {
else
verbose_output = 0;
} else {
else
verbose_output = 0;
} else {
- return
(-1)
;
+ return
-1
;
}
}
- return
(0)
;
+ return
0
;
} /* int vmem_config */
static int vmem_read(void) {
} /* int vmem_config */
static int vmem_read(void) {
@@
-104,10
+104,8
@@
static int vmem_read(void) {
fh = fopen("/proc/vmstat", "r");
if (fh == NULL) {
fh = fopen("/proc/vmstat", "r");
if (fh == NULL) {
- char errbuf[1024];
- ERROR("vmem plugin: fopen (/proc/vmstat) failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
- return (-1);
+ ERROR("vmem plugin: fopen (/proc/vmstat) failed: %s", STRERRNO);
+ return -1;
}
while (fgets(buffer, sizeof(buffer), fh) != NULL) {
}
while (fgets(buffer, sizeof(buffer), fh) != NULL) {
@@
-253,7
+251,7
@@
static int vmem_read(void) {
submit_two(NULL, "vmpage_io", "swap", pswpin, pswpout);
#endif /* KERNEL_LINUX */
submit_two(NULL, "vmpage_io", "swap", pswpin, pswpout);
#endif /* KERNEL_LINUX */
- return
(0)
;
+ return
0
;
} /* int vmem_read */
void module_register(void) {
} /* int vmem_read */
void module_register(void) {