replace STATX_ALL with (STATX_BASIC_STATS | STATX_BTIME) as former is deprecated
This commit is contained in:
parent
3a85d3fa78
commit
d84114690b
@ -189,7 +189,7 @@ fn statx(
|
||||
// See: https://github.com/rust-lang/rust/issues/65662
|
||||
//
|
||||
// FIXME what about transient conditions like `ENOMEM`?
|
||||
let err2 = cvt(statx(0, ptr::null(), 0, libc::STATX_ALL, ptr::null_mut()))
|
||||
let err2 = cvt(statx(0, ptr::null(), 0, libc::STATX_BASIC_STATS | libc::STATX_BTIME, ptr::null_mut()))
|
||||
.err()
|
||||
.and_then(|e| e.raw_os_error());
|
||||
if err2 == Some(libc::EFAULT) {
|
||||
@ -910,7 +910,7 @@ pub fn metadata(&self) -> io::Result<FileAttr> {
|
||||
fd,
|
||||
name,
|
||||
libc::AT_SYMLINK_NOFOLLOW | libc::AT_STATX_SYNC_AS_STAT,
|
||||
libc::STATX_ALL,
|
||||
libc::STATX_BASIC_STATS | libc::STATX_BTIME,
|
||||
) } {
|
||||
return ret;
|
||||
}
|
||||
@ -1194,7 +1194,7 @@ pub fn file_attr(&self) -> io::Result<FileAttr> {
|
||||
fd,
|
||||
c"".as_ptr() as *const c_char,
|
||||
libc::AT_EMPTY_PATH | libc::AT_STATX_SYNC_AS_STAT,
|
||||
libc::STATX_ALL,
|
||||
libc::STATX_BASIC_STATS | libc::STATX_BTIME,
|
||||
) } {
|
||||
return ret;
|
||||
}
|
||||
@ -1767,7 +1767,7 @@ pub fn stat(p: &Path) -> io::Result<FileAttr> {
|
||||
libc::AT_FDCWD,
|
||||
p.as_ptr(),
|
||||
libc::AT_STATX_SYNC_AS_STAT,
|
||||
libc::STATX_ALL,
|
||||
libc::STATX_BASIC_STATS | libc::STATX_BTIME,
|
||||
) } {
|
||||
return ret;
|
||||
}
|
||||
@ -1786,7 +1786,7 @@ pub fn lstat(p: &Path) -> io::Result<FileAttr> {
|
||||
libc::AT_FDCWD,
|
||||
p.as_ptr(),
|
||||
libc::AT_SYMLINK_NOFOLLOW | libc::AT_STATX_SYNC_AS_STAT,
|
||||
libc::STATX_ALL,
|
||||
libc::STATX_BASIC_STATS | libc::STATX_BTIME,
|
||||
) } {
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user