mount-util: fold what we need from get_mount_flags() bind_remount_one_with_mountinfo()
authorLennart Poettering <lennart@poettering.net>
Wed, 24 Mar 2021 13:16:45 +0000 (14:16 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 26 Mar 2021 10:51:26 +0000 (11:51 +0100)
commit2c5ff8ea76d8c3c9944567ae97f498925dfcd443
tree949903dcf06ef0320ab50dac3035fcb146eab9e3
parentba8dced2a60d8535bf6d685e2fd164e5ff3f056b
mount-util: fold what we need from get_mount_flags() bind_remount_one_with_mountinfo()

And get rid of get_mount_flags() altogether.

(This drops the statvfs() fallback that get_mount_flags() did. That
fallback was incomplete however, and mostly hid errors. Our primary
avenue to get mount flags is /proc/self/mountinfo and we should trust
it, and fix bugs we might encounter with it, but not tape over it.
Dropping the fallback is relevant in particular as it actually returned
mount flags for any path, not just mount points, which was very icky.)
src/shared/mount-util.c