From 7058bcef55ecdab7e7df463d450fda1beff3e92b Mon Sep 17 00:00:00 2001 From: Steve Lau Date: Tue, 6 Dec 2022 21:45:12 +0800 Subject: feat: I/O safety for 'sys/statfs' --- test/test_fcntl.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') 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 -- cgit v1.2.3