X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Futils_mount.c;h=f2b79439adc77e70b495cf7079a38ef18997dfbc;hb=40e77dd34f9a8466165a8b7d724faeb337c90414;hp=6e6644f4cd9d413bc3b88fad850b99b54f03fb92;hpb=20f29799747d983f74feec56cd48c408e3314770;p=collectd.git diff --git a/src/utils_mount.c b/src/utils_mount.c index 6e6644f4..f2b79439 100644 --- a/src/utils_mount.c +++ b/src/utils_mount.c @@ -21,20 +21,18 @@ * Niki W. Waibel **/ -#if HAVE_CONFIG_H -# include "config.h" -#endif +#include "collectd.h" +#include "utils_mount.h" + +#include "common.h" /* sstrncpy() et alii */ +#include "plugin.h" /* ERROR() macro */ -#include "common.h" #if HAVE_XFS_XQM_H # include #define XFS_SUPER_MAGIC_STR "XFSB" #define XFS_SUPER_MAGIC2_STR "BSFX" #endif -#include "plugin.h" -#include "utils_mount.h" - #if HAVE_GETVFSSTAT # if HAVE_SYS_TYPES_H # include @@ -762,13 +760,13 @@ void cu_mount_freelist (cu_mount_t *list) char * cu_mount_checkoption(char *line, char *keyword, int full) { - char *line2, *l2; - int l = strlen(keyword); - char *p1, *p2; + char *line2, *l2, *p1, *p2; + int l; if(line == NULL || keyword == NULL) { return NULL; } + if(full != 0) { full = 1; } @@ -782,6 +780,7 @@ cu_mount_checkoption(char *line, char *keyword, int full) l2++; } + l = strlen(keyword); p1 = line - 1; p2 = strchr(line, ','); do {