Skip to main content

verify_inode

Function verify_inode 

Source
pub fn verify_inode<F>(fd: &OwnedFd, verify: F) -> Result<(), VerifyInodeError>
Expand description

Verify file descriptor using stat and statfs, similar to runc’s VerifyInode.

This is a helper function that gets stat/statfs for a file descriptor and calls the provided verification function with the results.

§Arguments

  • fd - The file descriptor to verify
  • verify - A closure that receives stat and statfs results and performs verification

§Returns

Returns Ok(()) if verification succeeds, or an error if stat/statfs fails or the verification function returns an error.

Ref: https://github.com/opencontainers/runc/blob/v1.4.0/libcontainer/system/linux.go