]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
add check for statvfs
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 1 Jul 2022 09:09:15 +0000 (11:09 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 25 Jul 2022 22:12:32 +0000 (18:12 -0400)
we use HAVE_STATVFS in the code but with meson the check got
lost causing mount_entry to fail to remount some things such
as a bind mount of /dev/fuse via

    lxc.mount.entry = /dev/fuse dev/fuse none bind,create=file 0 0

which would cause the following log messages:

    DEBUG    conf - ../src/lxc/conf.c:mount_entry:2416 - Remounting "/dev/fuse" on "/usr/lib/x86_64-linux-gnu/lxc/rootfs/dev/fuse" to respect bind or remount options
    ERROR    conf - ../src/lxc/conf.c:mount_entry:2459 - Operation not permitted - Failed to mount "/dev/fuse" on "/usr/lib/x86_64-linux-gnu/lxc/rootfs/dev/fuse"

note that the `Flags for ... were ...` line is not showing
up there, which depends on HAVE_STATVFS

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
meson.build

index 49a1c9a58c0f5451cb0275747e7409ad8d20167d..f30eb0eb0f317e5d8ffa2554ceba5127398bae6a 100644 (file)
@@ -537,6 +537,7 @@ foreach tuple: [
     ['sigdescr_np'],
     ['signalfd'],
     ['statx'],
+    ['statvfs'],
     ['strlcat'],
     ['strlcpy'],
     ['unshare'],
@@ -666,6 +667,7 @@ foreach ident: [
     ['setns',             '''#include <sched.h>'''],
     ['sigdescr_np',       '''#include <string.h>'''],
     ['signalfd',          '''#include <sys/signalfd.h>'''],
+    ['statvfs',           '''#include <sys/statvfs.h>'''],
     ['statx',             '''#include <sys/types.h>
                              #include <sys/stat.h>
                              #include <unistd.h>'''],