mariadb/cmake/os
Daniel Black 129616c70a 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: 0ee5cf837e

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
2022-08-31 10:32:04 +10:00
..
AIX.cmake Update FSF Address 2019-05-11 21:29:06 +03:00
Cygwin.cmake Update FSF Address 2019-05-11 21:29:06 +03:00
FreeBSD.cmake MDEV-27686 Moving libexecinfo out of FreeBSD / OpenBSD specific CMake code 2022-07-17 15:14:52 +02:00
HP-UX.cmake Update FSF Address 2019-05-11 21:29:06 +03:00
Linux.cmake Merge remote-tracking branch 'origin/10.2' into 10.3 2019-09-24 23:05:09 +04:00
OS400.cmake Update FSF Address 2019-05-11 21:29:06 +03:00
SunOS.cmake Update FSF Address 2019-05-11 21:29:06 +03:00
Windows.cmake MDEV-21082: isnan/isinf compilation errors, isfinite warnings on MacOS 2019-11-19 16:28:15 +03:00
WindowsCache.cmake MDEV-28592 disks plugin - getmntinfo (BSD) & getmntent (AIX) 2022-08-31 10:32:04 +10:00