We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67f7d46 commit 2f546c9Copy full SHA for 2f546c9
src/kmod.rs
@@ -3,7 +3,7 @@
3
//! For more details see
4
5
use std::ffi::CStr;
6
-use std::os::unix::io::AsRawFd;
+use std::os::unix::io::{AsFd, AsRawFd};
7
8
use crate::errno::Errno;
9
use crate::Result;
@@ -79,15 +79,15 @@ libc_bitflags!(
79
/// ```
80
///
81
/// See [`man init_module(2)`](https://man7.org/linux/man-pages/man2/init_module.2.html) for more information.
82
-pub fn finit_module<T: AsRawFd>(
83
- fd: &T,
+pub fn finit_module<Fd: AsFd>(
+ fd: &Fd,
84
param_values: &CStr,
85
flags: ModuleInitFlags,
86
) -> Result<()> {
87
let res = unsafe {
88
libc::syscall(
89
libc::SYS_finit_module,
90
- fd.as_raw_fd(),
+ fd.as_fd().as_raw_fd(),
91
param_values.as_ptr(),
92
flags.bits(),
93
)
0 commit comments