@@ -72,7 +72,7 @@ use std::{
7272 ffi:: CString ,
7373 io,
7474 num:: NonZeroU32 ,
75- os:: fd:: { AsFd , AsRawFd , BorrowedFd , OwnedFd } ,
75+ os:: fd:: { AsFd , AsRawFd , BorrowedFd } ,
7676 path:: { Path , PathBuf } ,
7777 sync:: Arc ,
7878 time:: { Duration , SystemTime } ,
@@ -224,7 +224,7 @@ pub enum ProgramError {
224224
225225/// A [`Program`] file descriptor.
226226#[ derive( Debug ) ]
227- pub struct ProgramFd ( OwnedFd ) ;
227+ pub struct ProgramFd ( crate :: MockableFd ) ;
228228
229229impl ProgramFd {
230230 /// Creates a new instance that shares the same underlying file description as [`self`].
@@ -460,10 +460,10 @@ pub(crate) struct ProgramData<T: Link> {
460460 pub ( crate ) fd : Option < ProgramFd > ,
461461 pub ( crate ) links : LinkMap < T > ,
462462 pub ( crate ) expected_attach_type : Option < bpf_attach_type > ,
463- pub ( crate ) attach_btf_obj_fd : Option < OwnedFd > ,
463+ pub ( crate ) attach_btf_obj_fd : Option < crate :: MockableFd > ,
464464 pub ( crate ) attach_btf_id : Option < u32 > ,
465465 pub ( crate ) attach_prog_fd : Option < ProgramFd > ,
466- pub ( crate ) btf_fd : Option < Arc < OwnedFd > > ,
466+ pub ( crate ) btf_fd : Option < Arc < crate :: MockableFd > > ,
467467 pub ( crate ) verifier_log_level : VerifierLogLevel ,
468468 pub ( crate ) path : Option < PathBuf > ,
469469 pub ( crate ) flags : u32 ,
@@ -473,7 +473,7 @@ impl<T: Link> ProgramData<T> {
473473 pub ( crate ) fn new (
474474 name : Option < String > ,
475475 obj : ( obj:: Program , obj:: Function ) ,
476- btf_fd : Option < Arc < OwnedFd > > ,
476+ btf_fd : Option < Arc < crate :: MockableFd > > ,
477477 verifier_log_level : VerifierLogLevel ,
478478 ) -> Self {
479479 Self {
@@ -494,7 +494,7 @@ impl<T: Link> ProgramData<T> {
494494
495495 pub ( crate ) fn from_bpf_prog_info (
496496 name : Option < String > ,
497- fd : OwnedFd ,
497+ fd : crate :: MockableFd ,
498498 path : & Path ,
499499 info : bpf_prog_info ,
500500 verifier_log_level : VerifierLogLevel ,
0 commit comments