From 65d10f9ffcad065bd87c15aacc85cc4a0c2a03ee Mon Sep 17 00:00:00 2001 From: ajwerner Date: Thu, 29 Jun 2023 14:55:59 -0400 Subject: [PATCH] aya: replace os::unix::prelude with os::fd --- aya/src/maps/array/program_array.rs | 2 +- aya/src/maps/mod.rs | 2 +- aya/src/maps/perf/async_perf_event_array.rs | 2 +- aya/src/maps/sock/sock_map.rs | 2 +- aya/src/programs/cgroup_device.rs | 2 +- aya/src/programs/cgroup_skb.rs | 2 +- aya/src/programs/cgroup_sock.rs | 2 +- aya/src/programs/cgroup_sock_addr.rs | 2 +- aya/src/programs/cgroup_sockopt.rs | 2 +- aya/src/programs/cgroup_sysctl.rs | 2 +- aya/src/programs/extension.rs | 2 +- aya/src/programs/links.rs | 2 +- aya/src/programs/lirc_mode2.rs | 2 +- aya/src/programs/sk_lookup.rs | 2 +- aya/src/programs/socket_filter.rs | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/aya/src/maps/array/program_array.rs b/aya/src/maps/array/program_array.rs index b8a57cf5..8418b1cd 100644 --- a/aya/src/maps/array/program_array.rs +++ b/aya/src/maps/array/program_array.rs @@ -2,7 +2,7 @@ use std::{ borrow::{Borrow, BorrowMut}, - os::unix::prelude::{AsRawFd, RawFd}, + os::fd::{AsRawFd, RawFd}, }; use crate::{ diff --git a/aya/src/maps/mod.rs b/aya/src/maps/mod.rs index fa27c053..3f20c503 100644 --- a/aya/src/maps/mod.rs +++ b/aya/src/maps/mod.rs @@ -42,7 +42,7 @@ use std::{ marker::PhantomData, mem, ops::Deref, - os::unix::{io::RawFd, prelude::AsRawFd}, + os::fd::{AsRawFd, RawFd}, path::Path, ptr, }; diff --git a/aya/src/maps/perf/async_perf_event_array.rs b/aya/src/maps/perf/async_perf_event_array.rs index 7e27b4f5..a42eab8d 100644 --- a/aya/src/maps/perf/async_perf_event_array.rs +++ b/aya/src/maps/perf/async_perf_event_array.rs @@ -1,7 +1,7 @@ use bytes::BytesMut; use std::{ borrow::{Borrow, BorrowMut}, - os::unix::prelude::{AsRawFd, RawFd}, + os::fd::{AsRawFd, RawFd}, }; #[cfg(all(not(feature = "async_tokio"), feature = "async_std"))] diff --git a/aya/src/maps/sock/sock_map.rs b/aya/src/maps/sock/sock_map.rs index 32625b41..732917de 100644 --- a/aya/src/maps/sock/sock_map.rs +++ b/aya/src/maps/sock/sock_map.rs @@ -2,7 +2,7 @@ use std::{ borrow::{Borrow, BorrowMut}, - os::unix::{io::AsRawFd, prelude::RawFd}, + os::fd::{AsRawFd, RawFd}, }; use crate::{ diff --git a/aya/src/programs/cgroup_device.rs b/aya/src/programs/cgroup_device.rs index b4a9a3c4..9e1d94a9 100644 --- a/aya/src/programs/cgroup_device.rs +++ b/aya/src/programs/cgroup_device.rs @@ -1,5 +1,5 @@ //! Cgroup device programs. -use std::os::unix::prelude::{AsRawFd, RawFd}; +use std::os::fd::{AsRawFd, RawFd}; use crate::{ generated::{bpf_attach_type::BPF_CGROUP_DEVICE, bpf_prog_type::BPF_PROG_TYPE_CGROUP_DEVICE}, diff --git a/aya/src/programs/cgroup_skb.rs b/aya/src/programs/cgroup_skb.rs index aa7541e1..558afadf 100644 --- a/aya/src/programs/cgroup_skb.rs +++ b/aya/src/programs/cgroup_skb.rs @@ -1,7 +1,7 @@ //! Cgroup skb programs. use std::{ hash::Hash, - os::unix::prelude::{AsRawFd, RawFd}, + os::fd::{AsRawFd, RawFd}, path::Path, }; diff --git a/aya/src/programs/cgroup_sock.rs b/aya/src/programs/cgroup_sock.rs index 2f391d95..f4a0b59b 100644 --- a/aya/src/programs/cgroup_sock.rs +++ b/aya/src/programs/cgroup_sock.rs @@ -3,7 +3,7 @@ pub use aya_obj::programs::CgroupSockAttachType; use std::{ hash::Hash, - os::unix::prelude::{AsRawFd, RawFd}, + os::fd::{AsRawFd, RawFd}, path::Path, }; diff --git a/aya/src/programs/cgroup_sock_addr.rs b/aya/src/programs/cgroup_sock_addr.rs index e1817252..cc2b3106 100644 --- a/aya/src/programs/cgroup_sock_addr.rs +++ b/aya/src/programs/cgroup_sock_addr.rs @@ -3,7 +3,7 @@ pub use aya_obj::programs::CgroupSockAddrAttachType; use std::{ hash::Hash, - os::unix::prelude::{AsRawFd, RawFd}, + os::fd::{AsRawFd, RawFd}, path::Path, }; diff --git a/aya/src/programs/cgroup_sockopt.rs b/aya/src/programs/cgroup_sockopt.rs index 8b744a8c..eff006e9 100644 --- a/aya/src/programs/cgroup_sockopt.rs +++ b/aya/src/programs/cgroup_sockopt.rs @@ -3,7 +3,7 @@ pub use aya_obj::programs::CgroupSockoptAttachType; use std::{ hash::Hash, - os::unix::prelude::{AsRawFd, RawFd}, + os::fd::{AsRawFd, RawFd}, path::Path, }; diff --git a/aya/src/programs/cgroup_sysctl.rs b/aya/src/programs/cgroup_sysctl.rs index 7c39a1e3..81fd7a6b 100644 --- a/aya/src/programs/cgroup_sysctl.rs +++ b/aya/src/programs/cgroup_sysctl.rs @@ -1,7 +1,7 @@ //! Cgroup sysctl programs. use std::{ hash::Hash, - os::unix::prelude::{AsRawFd, RawFd}, + os::fd::{AsRawFd, RawFd}, }; use crate::{ diff --git a/aya/src/programs/extension.rs b/aya/src/programs/extension.rs index 263b7b67..aaff4b61 100644 --- a/aya/src/programs/extension.rs +++ b/aya/src/programs/extension.rs @@ -1,5 +1,5 @@ //! Extension programs. -use std::os::unix::prelude::{AsRawFd, RawFd}; +use std::os::fd::{AsRawFd, RawFd}; use thiserror::Error; use object::Endianness; diff --git a/aya/src/programs/links.rs b/aya/src/programs/links.rs index 19177f35..86017b15 100644 --- a/aya/src/programs/links.rs +++ b/aya/src/programs/links.rs @@ -6,7 +6,7 @@ use std::{ collections::{hash_map::Entry, HashMap}, ffi::CString, io, - os::unix::prelude::RawFd, + os::fd::RawFd, path::{Path, PathBuf}, }; diff --git a/aya/src/programs/lirc_mode2.rs b/aya/src/programs/lirc_mode2.rs index c91188fa..98f348b3 100644 --- a/aya/src/programs/lirc_mode2.rs +++ b/aya/src/programs/lirc_mode2.rs @@ -1,5 +1,5 @@ //! Lirc programs. -use std::os::unix::prelude::{AsRawFd, RawFd}; +use std::os::fd::{AsRawFd, RawFd}; use crate::{ generated::{bpf_attach_type::BPF_LIRC_MODE2, bpf_prog_type::BPF_PROG_TYPE_LIRC_MODE2}, diff --git a/aya/src/programs/sk_lookup.rs b/aya/src/programs/sk_lookup.rs index 8d95e9ec..8230a81e 100644 --- a/aya/src/programs/sk_lookup.rs +++ b/aya/src/programs/sk_lookup.rs @@ -1,4 +1,4 @@ -use std::os::unix::prelude::{AsRawFd, RawFd}; +use std::os::fd::{AsRawFd, RawFd}; use crate::{ generated::{bpf_attach_type::BPF_SK_LOOKUP, bpf_prog_type::BPF_PROG_TYPE_SK_LOOKUP}, diff --git a/aya/src/programs/socket_filter.rs b/aya/src/programs/socket_filter.rs index 8534574d..920052d0 100644 --- a/aya/src/programs/socket_filter.rs +++ b/aya/src/programs/socket_filter.rs @@ -2,7 +2,7 @@ use libc::{setsockopt, SOL_SOCKET}; use std::{ io, mem, - os::unix::prelude::{AsRawFd, RawFd}, + os::fd::{AsRawFd, RawFd}, }; use thiserror::Error;