projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Run all changed files 68 8.c/1*.h through format.sh web util
[collectd.git]
/
src
/
interface.c
diff --git
a/src/interface.c
b/src/interface.c
index
c45ef66
..
5367ced
100644
(file)
--- a/
src/interface.c
+++ b/
src/interface.c
@@
-24,9
+24,9
@@
#include "collectd.h"
#include "collectd.h"
-#include "common.h"
#include "plugin.h"
#include "plugin.h"
-#include "utils_ignorelist.h"
+#include "utils/common/common.h"
+#include "utils/ignorelist/ignorelist.h"
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
@@
-86,9
+86,9
@@
static const char *config_keys[] = {
};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
-static ignorelist_t *ignorelist
= NULL
;
+static ignorelist_t *ignorelist;
-static
_Bool report_inactive = 1
;
+static
bool report_inactive = true
;
#ifdef HAVE_LIBKSTAT
#if HAVE_KSTAT_H
#ifdef HAVE_LIBKSTAT
#if HAVE_KSTAT_H
@@
-97,8
+97,8
@@
static _Bool report_inactive = 1;
#define MAX_NUMIF 256
extern kstat_ctl_t *kc;
static kstat_t *ksp[MAX_NUMIF];
#define MAX_NUMIF 256
extern kstat_ctl_t *kc;
static kstat_t *ksp[MAX_NUMIF];
-static int numif
= 0
;
-static
_Bool unique_name = 0
;
+static int numif;
+static
bool unique_name
;
#endif /* HAVE_LIBKSTAT */
static int interface_config(const char *key, const char *value) {
#endif /* HAVE_LIBKSTAT */
static int interface_config(const char *key, const char *value) {
@@
-117,7
+117,7
@@
static int interface_config(const char *key, const char *value) {
else if (strcasecmp(key, "UniqueName") == 0) {
#ifdef HAVE_LIBKSTAT
if (IS_TRUE(value))
else if (strcasecmp(key, "UniqueName") == 0) {
#ifdef HAVE_LIBKSTAT
if (IS_TRUE(value))
- unique_name =
1
;
+ unique_name =
true
;
#else
WARNING("interface plugin: the \"UniqueName\" option is only valid on "
"Solaris.");
#else
WARNING("interface plugin: the \"UniqueName\" option is only valid on "
"Solaris.");
@@
-297,8
+297,8
@@
static int interface_read(void) {
continue;
if (unique_name)
continue;
if (unique_name)
- snprintf(iname, sizeof(iname), "%s_%d_%s", ksp[i]->ks_module,
- ksp[i]->ks_instance, ksp[i]->ks_name);
+ s
s
nprintf(iname, sizeof(iname), "%s_%d_%s", ksp[i]->ks_module,
+
ksp[i]->ks_instance, ksp[i]->ks_name);
else
sstrncpy(iname, ksp[i]->ks_name, sizeof(iname));
else
sstrncpy(iname, ksp[i]->ks_name, sizeof(iname));