summaryrefslogtreecommitdiffstats
path: root/vendor/xattr/src/sys/unsupported.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /vendor/xattr/src/sys/unsupported.rs
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/xattr/src/sys/unsupported.rs')
-rw-r--r--vendor/xattr/src/sys/unsupported.rs77
1 files changed, 77 insertions, 0 deletions
diff --git a/vendor/xattr/src/sys/unsupported.rs b/vendor/xattr/src/sys/unsupported.rs
new file mode 100644
index 000000000..7eb48a5d4
--- /dev/null
+++ b/vendor/xattr/src/sys/unsupported.rs
@@ -0,0 +1,77 @@
+use std::ffi::{OsStr, OsString};
+use std::io;
+use std::os::unix::io::RawFd;
+use std::path::Path;
+
+use UnsupportedPlatformError;
+
+/// An iterator over a set of extended attributes names.
+#[derive(Clone, Debug)]
+pub struct XAttrs;
+
+impl Iterator for XAttrs {
+ type Item = OsString;
+ fn next(&mut self) -> Option<OsString> {
+ unreachable!("this should never exist")
+ }
+
+ fn size_hint(&self) -> (usize, Option<usize>) {
+ unreachable!("this should never exist")
+ }
+}
+
+pub fn get_fd(_: RawFd, _: &OsStr) -> io::Result<Vec<u8>> {
+ Err(io::Error::new(
+ io::ErrorKind::Other,
+ UnsupportedPlatformError,
+ ))
+}
+
+pub fn set_fd(_: RawFd, _: &OsStr, _: &[u8]) -> io::Result<()> {
+ Err(io::Error::new(
+ io::ErrorKind::Other,
+ UnsupportedPlatformError,
+ ))
+}
+
+pub fn remove_fd(_: RawFd, _: &OsStr) -> io::Result<()> {
+ Err(io::Error::new(
+ io::ErrorKind::Other,
+ UnsupportedPlatformError,
+ ))
+}
+
+pub fn list_fd(_: RawFd) -> io::Result<XAttrs> {
+ Err(io::Error::new(
+ io::ErrorKind::Other,
+ UnsupportedPlatformError,
+ ))
+}
+
+pub fn get_path(_: &Path, _: &OsStr) -> io::Result<Vec<u8>> {
+ Err(io::Error::new(
+ io::ErrorKind::Other,
+ UnsupportedPlatformError,
+ ))
+}
+
+pub fn set_path(_: &Path, _: &OsStr, _: &[u8]) -> io::Result<()> {
+ Err(io::Error::new(
+ io::ErrorKind::Other,
+ UnsupportedPlatformError,
+ ))
+}
+
+pub fn remove_path(_: &Path, _: &OsStr) -> io::Result<()> {
+ Err(io::Error::new(
+ io::ErrorKind::Other,
+ UnsupportedPlatformError,
+ ))
+}
+
+pub fn list_path(_: &Path) -> io::Result<XAttrs> {
+ Err(io::Error::new(
+ io::ErrorKind::Other,
+ UnsupportedPlatformError,
+ ))
+}