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 #1455 from rubenk/configure-ac-remove-dead-code
[collectd.git]
/
src
/
utils_mount.c
diff --git
a/src/utils_mount.c
b/src/utils_mount.c
index
6e6644f
..
f2b7943
100644
(file)
--- a/
src/utils_mount.c
+++ b/
src/utils_mount.c
@@
-21,20
+21,18
@@
* Niki W. Waibel <niki.waibel@gmx.net>
**/
* Niki W. Waibel <niki.waibel@gmx.net>
**/
-#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 <xfs/xqm.h>
#define XFS_SUPER_MAGIC_STR "XFSB"
#define XFS_SUPER_MAGIC2_STR "BSFX"
#endif
#if HAVE_XFS_XQM_H
# include <xfs/xqm.h>
#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 <sys/types.h>
#if HAVE_GETVFSSTAT
# if HAVE_SYS_TYPES_H
# include <sys/types.h>
@@
-762,13
+760,13
@@
void cu_mount_freelist (cu_mount_t *list)
char *
cu_mount_checkoption(char *line, char *keyword, int full)
{
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(line == NULL || keyword == NULL) {
return NULL;
}
+
if(full != 0) {
full = 1;
}
if(full != 0) {
full = 1;
}
@@
-782,6
+780,7
@@
cu_mount_checkoption(char *line, char *keyword, int full)
l2++;
}
l2++;
}
+ l = strlen(keyword);
p1 = line - 1;
p2 = strchr(line, ',');
do {
p1 = line - 1;
p2 = strchr(line, ',');
do {