aya: replace os::unix::prelude with os::fd

pull/633/head
ajwerner 1 year ago
parent b2737d5b0d
commit 65d10f9ffc

@ -2,7 +2,7 @@
use std::{ use std::{
borrow::{Borrow, BorrowMut}, borrow::{Borrow, BorrowMut},
os::unix::prelude::{AsRawFd, RawFd}, os::fd::{AsRawFd, RawFd},
}; };
use crate::{ use crate::{

@ -42,7 +42,7 @@ use std::{
marker::PhantomData, marker::PhantomData,
mem, mem,
ops::Deref, ops::Deref,
os::unix::{io::RawFd, prelude::AsRawFd}, os::fd::{AsRawFd, RawFd},
path::Path, path::Path,
ptr, ptr,
}; };

@ -1,7 +1,7 @@
use bytes::BytesMut; use bytes::BytesMut;
use std::{ use std::{
borrow::{Borrow, BorrowMut}, borrow::{Borrow, BorrowMut},
os::unix::prelude::{AsRawFd, RawFd}, os::fd::{AsRawFd, RawFd},
}; };
#[cfg(all(not(feature = "async_tokio"), feature = "async_std"))] #[cfg(all(not(feature = "async_tokio"), feature = "async_std"))]

@ -2,7 +2,7 @@
use std::{ use std::{
borrow::{Borrow, BorrowMut}, borrow::{Borrow, BorrowMut},
os::unix::{io::AsRawFd, prelude::RawFd}, os::fd::{AsRawFd, RawFd},
}; };
use crate::{ use crate::{

@ -1,5 +1,5 @@
//! Cgroup device programs. //! Cgroup device programs.
use std::os::unix::prelude::{AsRawFd, RawFd}; use std::os::fd::{AsRawFd, RawFd};
use crate::{ use crate::{
generated::{bpf_attach_type::BPF_CGROUP_DEVICE, bpf_prog_type::BPF_PROG_TYPE_CGROUP_DEVICE}, generated::{bpf_attach_type::BPF_CGROUP_DEVICE, bpf_prog_type::BPF_PROG_TYPE_CGROUP_DEVICE},

@ -1,7 +1,7 @@
//! Cgroup skb programs. //! Cgroup skb programs.
use std::{ use std::{
hash::Hash, hash::Hash,
os::unix::prelude::{AsRawFd, RawFd}, os::fd::{AsRawFd, RawFd},
path::Path, path::Path,
}; };

@ -3,7 +3,7 @@ pub use aya_obj::programs::CgroupSockAttachType;
use std::{ use std::{
hash::Hash, hash::Hash,
os::unix::prelude::{AsRawFd, RawFd}, os::fd::{AsRawFd, RawFd},
path::Path, path::Path,
}; };

@ -3,7 +3,7 @@ pub use aya_obj::programs::CgroupSockAddrAttachType;
use std::{ use std::{
hash::Hash, hash::Hash,
os::unix::prelude::{AsRawFd, RawFd}, os::fd::{AsRawFd, RawFd},
path::Path, path::Path,
}; };

@ -3,7 +3,7 @@ pub use aya_obj::programs::CgroupSockoptAttachType;
use std::{ use std::{
hash::Hash, hash::Hash,
os::unix::prelude::{AsRawFd, RawFd}, os::fd::{AsRawFd, RawFd},
path::Path, path::Path,
}; };

@ -1,7 +1,7 @@
//! Cgroup sysctl programs. //! Cgroup sysctl programs.
use std::{ use std::{
hash::Hash, hash::Hash,
os::unix::prelude::{AsRawFd, RawFd}, os::fd::{AsRawFd, RawFd},
}; };
use crate::{ use crate::{

@ -1,5 +1,5 @@
//! Extension programs. //! Extension programs.
use std::os::unix::prelude::{AsRawFd, RawFd}; use std::os::fd::{AsRawFd, RawFd};
use thiserror::Error; use thiserror::Error;
use object::Endianness; use object::Endianness;

@ -6,7 +6,7 @@ use std::{
collections::{hash_map::Entry, HashMap}, collections::{hash_map::Entry, HashMap},
ffi::CString, ffi::CString,
io, io,
os::unix::prelude::RawFd, os::fd::RawFd,
path::{Path, PathBuf}, path::{Path, PathBuf},
}; };

@ -1,5 +1,5 @@
//! Lirc programs. //! Lirc programs.
use std::os::unix::prelude::{AsRawFd, RawFd}; use std::os::fd::{AsRawFd, RawFd};
use crate::{ use crate::{
generated::{bpf_attach_type::BPF_LIRC_MODE2, bpf_prog_type::BPF_PROG_TYPE_LIRC_MODE2}, generated::{bpf_attach_type::BPF_LIRC_MODE2, bpf_prog_type::BPF_PROG_TYPE_LIRC_MODE2},

@ -1,4 +1,4 @@
use std::os::unix::prelude::{AsRawFd, RawFd}; use std::os::fd::{AsRawFd, RawFd};
use crate::{ use crate::{
generated::{bpf_attach_type::BPF_SK_LOOKUP, bpf_prog_type::BPF_PROG_TYPE_SK_LOOKUP}, generated::{bpf_attach_type::BPF_SK_LOOKUP, bpf_prog_type::BPF_PROG_TYPE_SK_LOOKUP},

@ -2,7 +2,7 @@
use libc::{setsockopt, SOL_SOCKET}; use libc::{setsockopt, SOL_SOCKET};
use std::{ use std::{
io, mem, io, mem,
os::unix::prelude::{AsRawFd, RawFd}, os::fd::{AsRawFd, RawFd},
}; };
use thiserror::Error; use thiserror::Error;

Loading…
Cancel
Save