projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
src/plugin.c: Introduce the `DS_TYPE_TO_STRING' macro.
[collectd.git]
/
src
/
plugin.h
diff --git
a/src/plugin.h
b/src/plugin.h
index
0ccb198
..
b35fcf1
100644
(file)
--- a/
src/plugin.h
+++ b/
src/plugin.h
@@
-33,6
+33,13
@@
#define DS_TYPE_DERIVE 2
#define DS_TYPE_ABSOLUTE 3
#define DS_TYPE_DERIVE 2
#define DS_TYPE_ABSOLUTE 3
+#define DS_TYPE_TO_STRING(t) (t == DS_TYPE_COUNTER) ? "counter" : \
+ (t == DS_TYPE_GAUGE) ? "gauge" : \
+ (t == DS_TYPE_DERIVE) ? "derive" : \
+ (t == DS_TYPE_ABSOLUTE) ? "absolute" : \
+ "unknown"
+
+
#ifndef LOG_ERR
# define LOG_ERR 3
#endif
#ifndef LOG_ERR
# define LOG_ERR 3
#endif