summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/fs/abs.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /vendor/rustix/src/fs/abs.rs
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/rustix/src/fs/abs.rs')
-rw-r--r--vendor/rustix/src/fs/abs.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/vendor/rustix/src/fs/abs.rs b/vendor/rustix/src/fs/abs.rs
index f57bd00fe..8953f351e 100644
--- a/vendor/rustix/src/fs/abs.rs
+++ b/vendor/rustix/src/fs/abs.rs
@@ -1,7 +1,7 @@
//! POSIX-style filesystem functions which operate on bare paths.
use crate::fd::OwnedFd;
-#[cfg(not(target_os = "espidf"))]
+#[cfg(not(any(target_os = "espidf", target_os = "vita")))]
use crate::fs::Access;
#[cfg(not(any(
solarish,
@@ -10,6 +10,7 @@ use crate::fs::Access;
target_os = "netbsd",
target_os = "nto",
target_os = "redox",
+ target_os = "vita",
target_os = "wasi",
)))]
use crate::fs::StatFs;
@@ -129,7 +130,8 @@ fn _readlink(path: &CStr, mut buffer: Vec<u8>) -> io::Result<CString> {
buffer.resize(nread, 0_u8);
return Ok(CString::new(buffer).unwrap());
}
- buffer.reserve(1); // use `Vec` reallocation strategy to grow capacity exponentially
+ // Use `Vec` reallocation strategy to grow capacity exponentially.
+ buffer.reserve(1);
buffer.resize(buffer.capacity(), 0_u8);
}
}
@@ -235,7 +237,7 @@ pub fn mkdir<P: path::Arg>(path: P, mode: Mode) -> io::Result<()> {
///
/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/access.html
/// [Linux]: https://man7.org/linux/man-pages/man2/access.2.html
-#[cfg(not(target_os = "espidf"))]
+#[cfg(not(any(target_os = "espidf", target_os = "vita")))]
#[inline]
pub fn access<P: path::Arg>(path: P, access: Access) -> io::Result<()> {
path.into_with_c_str(|path| backend::fs::syscalls::access(path, access))
@@ -257,6 +259,7 @@ pub fn access<P: path::Arg>(path: P, access: Access) -> io::Result<()> {
target_os = "netbsd",
target_os = "nto",
target_os = "redox",
+ target_os = "vita",
target_os = "wasi",
)))]
#[inline]