On Wed, Oct 18, 2023 at 05:35:33PM -0700, Parke wrote: > On Wed, Oct 18, 2023 at 5:27 PM Kent Overstreet > <[email protected]> wrote: > > What about testing if st_dev is different from the parent directory? > > That was my first thought. > > Unfortunately, there are complications due to symlinks, bind mounts, > and possibly other factors. > > Discussion here: > https://lists.gnu.org/archive/html/coreutils/2023-10/msg00013.html
So, in that case, you just need a single bit reported via stat() or statx(). Unfortunately, I don't see a flags field in struct statx...
