1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-22 16:16:16 +04:00

add ioctl request id: FIONBIO (no real action, just return Ok(0)). p.s. for rustc

This commit is contained in:
chyyuu 2019-05-08 19:08:04 +08:00
parent d9d21a3db1
commit ccc7eea114
2 changed files with 5 additions and 0 deletions

View File

@ -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)?,

View File

@ -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;