summaryrefslogtreecommitdiff
path: root/config.h.cmake
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2022-07-31 13:41:59 +1000
committerDaniel Black <daniel@mariadb.org>2022-08-31 10:32:04 +1000
commit129616c70a69f5e0fe2f10bdd0e2785594305e44 (patch)
treec83fc3a5b7b3d2b87516b842f42092357accfb41 /config.h.cmake
parent57739ae94a4af580c62bbc87d364fa002c5dbe04 (diff)
downloadmariadb-git-129616c70a69f5e0fe2f10bdd0e2785594305e44.tar.gz
MDEV-28592 disks plugin - getmntinfo (BSD) & getmntent (AIX)
Thanks to references from Brad Smith, BSDs use getmntinfo as a system call for mounted filesystems. Most BSDs return statfs structures, (and we use OSX's statfs64), but NetBSD uses a statvfs structure. Simplify Linux getmntent_r to just use getmntent. AIX uses getmntent. An attempt at writing Solaris compatibility with a small bit of HPUX compatibility was made based on man page entries only. Fixes welcome. statvfs structures now use f_bsize for consistency with statfs Test case adjusted as PATH_MAX is OS defined (e.g. 1023 on AIX) Fixes: 0ee5cf837e3a0464acc20db2a2aee0adaff3f2ac also fixes: MDEV-27818: Disk plugin does not show zpool mounted devices This is because zpool mounted point don't begin with /. Due to the proliferation of multiple filesystem types since this was written, we restrict the entries listed in the disks plugin to excude: * read only mount points (no point monitoring, and includes squash, snaps, sysfs, procfs, cgroups...) * mount points that aren't directories (excludes /etc/hostname and similar mounts in containers). (getmntent (Linux/AIX) only) * exclude systems where there is no capacity listed (excludes various virtual filesystem types). Reviewer: Sergei Golubchik
Diffstat (limited to 'config.h.cmake')
-rw-r--r--config.h.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/config.h.cmake b/config.h.cmake
index 6e089ae3794..962efeb13ba 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -35,6 +35,11 @@
#cmakedefine HAVE_FLOAT_H 1
#cmakedefine HAVE_FNMATCH_H 1
#cmakedefine HAVE_FPU_CONTROL_H 1
+#cmakedefine HAVE_GETMNTENT 1
+#cmakedefine HAVE_GETMNTENT_IN_SYS_MNTAB 1
+#cmakedefine HAVE_GETMNTINFO 1
+#cmakedefine HAVE_GETMNTINFO64 1
+#cmakedefine HAVE_GETMNTINFO_TAKES_statvfs 1
#cmakedefine HAVE_GRP_H 1
#cmakedefine HAVE_IA64INTRIN_H 1
#cmakedefine HAVE_IEEEFP_H 1
@@ -214,6 +219,7 @@
#cmakedefine HAVE_SELECT 1
#cmakedefine HAVE_SETENV 1
#cmakedefine HAVE_SETLOCALE 1
+#cmakedefine HAVE_SETMNTENT 1
#cmakedefine HAVE_SETUPTERM 1
#cmakedefine HAVE_SIGSET 1
#cmakedefine HAVE_SIGACTION 1