diff --git a/kernel/src/fs/file_like.rs b/kernel/src/fs/file_like.rs index ae5ae6b..5e847f1 100644 --- a/kernel/src/fs/file_like.rs +++ b/kernel/src/fs/file_like.rs @@ -34,6 +34,7 @@ impl FileLike { match request { // TODO: place flags & path in FileLike in stead of FileHandle/Socket FIOCLEX => Ok(0), + FIONBIO => Ok(0), _ => { match self { FileLike::File(file) => file.io_control(request as u32, arg1)?, diff --git a/kernel/src/fs/ioctl.rs b/kernel/src/fs/ioctl.rs index 3eb3509..45bdebd 100644 --- a/kernel/src/fs/ioctl.rs +++ b/kernel/src/fs/ioctl.rs @@ -34,3 +34,7 @@ pub const FIONCLEX: usize = 0x6602; pub const FIOCLEX: usize = 0x5451; #[cfg(target_arch = "mips")] pub const FIOCLEX: usize = 0x6601; + +// rustc using pipe and ioctl pipe file with this request id +// for non-blocking/blocking IO control setting +pub const FIONBIO: usize = 0x5421; \ No newline at end of file