summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2750679)
raw | patch | inline | side by side (parent: 2750679)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Wed, 20 Jan 2016 21:32:03 +0000 (22:32 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Fri, 22 Jan 2016 09:51:17 +0000 (10:51 +0100) |
Recent DRBD versions display more detailed build information in
`/proc/drbd`, which caused the header identification to fail.
Comparing the first part of each line against all known header prefixes
will hopefully make this more robust.
Fixes #1514
Signed-off-by: Florian Forster <octo@collectd.org>
`/proc/drbd`, which caused the header identification to fail.
Comparing the first part of each line against all known header prefixes
will hopefully make this more robust.
Fixes #1514
Signed-off-by: Florian Forster <octo@collectd.org>
src/drbd.c | patch | blob | history |
diff --git a/src/drbd.c b/src/drbd.c
index cc306dcb2be679e7c91fde0255c3793033a1e232..d46bb020ed5cc89d821c1ea5caa71d665f169ec8 100644 (file)
--- a/src/drbd.c
+++ b/src/drbd.c
fields, STATIC_ARRAY_SIZE (fields));
/* ignore headers (first two iterations) */
- if (fields_num < 4)
+ if ((strcmp(fields[0], "version:") == 0) ||
+ (strcmp(fields[0], "srcversion:") == 0) ||
+ (strcmp(fields[0], "GIT-hash:") == 0))
+ {
continue;
+ }
if (isdigit(fields[0][0]))
{