@@ -15,9 +15,9 @@ use std::os::linux::process::PidFd as StdPidFd;
1515/// Currently, there are no flags.
1616#[ derive( Clone , Copy ) ]
1717#[ non_exhaustive]
18- pub struct GetfdFlags ;
18+ pub struct GetFdFlags ;
1919
20- impl GetfdFlags {
20+ impl GetFdFlags {
2121 pub const fn empty ( ) -> Self {
2222 Self
2323 }
@@ -29,18 +29,18 @@ impl GetfdFlags {
2929
3030/// An extension trait to provide a convenient interface to [`get_file_from_pidfd`].
3131pub trait PidFdExt {
32- fn get_file ( & self , target_fd : RawFd , flags : GetfdFlags ) -> IoResult < File > ;
32+ fn get_file ( & self , target_fd : RawFd , flags : GetFdFlags ) -> IoResult < File > ;
3333}
3434
3535impl PidFdExt for PidFd {
36- fn get_file ( & self , target_fd : RawFd , flags : GetfdFlags ) -> IoResult < File > {
36+ fn get_file ( & self , target_fd : RawFd , flags : GetFdFlags ) -> IoResult < File > {
3737 get_file_from_pidfd ( self . as_raw_fd ( ) , target_fd, flags)
3838 }
3939}
4040
4141#[ cfg( feature = "nightly" ) ]
4242impl PidFdExt for StdPidFd {
43- fn get_file ( & self , target_fd : RawFd , flags : GetfdFlags ) -> IoResult < File > {
43+ fn get_file ( & self , target_fd : RawFd , flags : GetFdFlags ) -> IoResult < File > {
4444 get_file_from_pidfd ( self . as_raw_fd ( ) , target_fd, flags)
4545 }
4646}
@@ -54,7 +54,7 @@ impl PidFdExt for StdPidFd {
5454/// see the man page for [`pidfd_getfd(2)`].
5555///
5656/// [`pidfd_getfd(2)`]: https://man7.org/linux/man-pages/man2/pidfd_getfd.2.html
57- pub fn get_file_from_pidfd ( pidfd : RawFd , target_fd : RawFd , flags : GetfdFlags ) -> IoResult < File > {
57+ pub fn get_file_from_pidfd ( pidfd : RawFd , target_fd : RawFd , flags : GetFdFlags ) -> IoResult < File > {
5858 // SAFETY: `flags` being 0 seems to be the only safety invariant for now.
5959 // Invalid fds return errors.
6060 let res = unsafe { pidfd_getfd ( pidfd, target_fd, flags. bits ( ) ) } ;
0 commit comments