Home
last modified time | relevance | path

Searched refs:oldfd (Results 1 – 2 of 2) sorted by relevance

/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dsyscall.rs377 pub fn dup(oldfd: i32) -> Result<usize, SystemError> { in dup()
381 if FileDescriptorVec::validate_fd(oldfd) { in dup()
382 if let Some(file) = &fds.fds[oldfd as usize] { in dup()
412 pub fn dup2(oldfd: i32, newfd: i32) -> Result<usize, SystemError> { in dup2()
415 if FileDescriptorVec::validate_fd(oldfd) && FileDescriptorVec::validate_fd(newfd) { in dup2()
417 if oldfd == newfd { in dup2()
422 if let Some(file) = &fds.fds[oldfd as usize] { in dup2()
/DragonOS-0.1.8/kernel/src/syscall/
Dmod.rs720 let oldfd: i32 = args[0] as c_int; in handle() localVariable
721 Self::dup(oldfd) in handle()
724 let oldfd: i32 = args[0] as c_int; in handle() localVariable
726 Self::dup2(oldfd, newfd) in handle()