diff options
author | Steve Lau <stevelauc@outlook.com> | 2022-12-06 21:45:12 +0800 |
---|---|---|
committer | Steve Lau <stevelauc@outlook.com> | 2022-12-06 21:45:12 +0800 |
commit | 7058bcef55ecdab7e7df463d450fda1beff3e92b (patch) | |
tree | b4bd812945a1f8460595186db38674f803f8d879 /test | |
parent | e2257dbb971fa974cf56f00a31d739a7e583e5b8 (diff) | |
download | nix-7058bcef55ecdab7e7df463d450fda1beff3e92b.zip |
feat: I/O safety for 'sys/statfs'
Diffstat (limited to 'test')
-rw-r--r-- | test/test_fcntl.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_fcntl.rs b/test/test_fcntl.rs index fb2a5e2e..8f50f16b 100644 --- a/test/test_fcntl.rs +++ b/test/test_fcntl.rs @@ -383,7 +383,7 @@ mod linux_android { let tmp = NamedTempFile::new().unwrap(); let fd = tmp.as_raw_fd(); - let statfs = nix::sys::statfs::fstatfs(&tmp).unwrap(); + let statfs = nix::sys::statfs::fstatfs(tmp.as_file()).unwrap(); if statfs.filesystem_type() == nix::sys::statfs::OVERLAYFS_SUPER_MAGIC { // OverlayFS is a union file system. It returns one inode value in // stat(2), but a different one shows up in /proc/locks. So we must @@ -421,7 +421,7 @@ mod linux_android { let tmp = NamedTempFile::new().unwrap(); let fd = tmp.as_raw_fd(); - let statfs = nix::sys::statfs::fstatfs(&tmp).unwrap(); + let statfs = nix::sys::statfs::fstatfs(tmp.as_file()).unwrap(); if statfs.filesystem_type() == nix::sys::statfs::OVERLAYFS_SUPER_MAGIC { // OverlayFS is a union file system. It returns one inode value in // stat(2), but a different one shows up in /proc/locks. So we must |