diff --git a/src/syscall/debug.rs b/src/syscall/debug.rs index b59dcc43fc..1fb6472c6c 100644 --- a/src/syscall/debug.rs +++ b/src/syscall/debug.rs @@ -267,11 +267,6 @@ pub fn format_call(a: usize, b: usize, c: usize, d: usize, e: usize, f: usize) - "virttophys({:#X})", b ), - SYS_PIPE2 => format!( - "pipe2({:?}, {})", - unsafe { read_struct::<[usize; 2]>(b) }, - c - ), SYS_SETREGID => format!( "setregid({}, {})", b, diff --git a/src/syscall/fs.rs b/src/syscall/fs.rs index 92113e71fb..a16d545079 100644 --- a/src/syscall/fs.rs +++ b/src/syscall/fs.rs @@ -117,40 +117,6 @@ pub fn open(raw_path: UserSliceRo, flags: usize) -> Result { }).ok_or(Error::new(EMFILE)) } -pub fn pipe2(fds: UserSliceWo, flags: usize) -> Result<()> { - let scheme_id = crate::scheme::pipe::pipe_scheme_id(); - let (read_id, write_id) = crate::scheme::pipe::pipe(flags)?; - - let context_lock = context::current()?; - let context = context_lock.read(); - - //log::warn!("Context {} used deprecated pipe2.", context.name); - - let read_fd = context.add_file(FileDescriptor { - description: Arc::new(RwLock::new(FileDescription { - namespace: context.ens, - scheme: scheme_id, - number: read_id, - flags: O_RDONLY | flags & !O_ACCMODE & !O_CLOEXEC, - })), - cloexec: flags & O_CLOEXEC == O_CLOEXEC, - }).ok_or(Error::new(EMFILE))?; - - let write_fd = context.add_file(FileDescriptor { - description: Arc::new(RwLock::new(FileDescription { - namespace: context.ens, - scheme: scheme_id, - number: write_id, - flags: O_WRONLY | flags & !O_ACCMODE & !O_CLOEXEC, - })), - cloexec: flags & O_CLOEXEC == O_CLOEXEC, - }).ok_or(Error::new(EMFILE))?; - - let (read_outptr, write_outptr) = fds.split_at(core::mem::size_of::()).ok_or(Error::new(EINVAL))?; - read_outptr.write_usize(read_fd.into())?; - write_outptr.write_usize(write_fd.into()) -} - /// rmdir syscall pub fn rmdir(raw_path: UserSliceRo) -> Result { let (uid, gid, scheme_ns) = match context::current()?.read() { diff --git a/src/syscall/mod.rs b/src/syscall/mod.rs index a4d11f8f97..41f3016bda 100644 --- a/src/syscall/mod.rs +++ b/src/syscall/mod.rs @@ -162,7 +162,6 @@ pub fn syscall(a: usize, b: usize, c: usize, d: usize, e: usize, f: usize, stack UserSlice::wo(d, 16)?.none_if_null(), ).map(|()| 0), SYS_SIGRETURN => sigreturn(), - SYS_PIPE2 => pipe2(UserSlice::wo(b, 2 * core::mem::size_of::())?, c).map(|()| 0), SYS_PHYSALLOC => physalloc(b), SYS_PHYSALLOC3 => physalloc3(b, c, UserSlice::rw(d, core::mem::size_of::())?), SYS_PHYSFREE => physfree(b, c), diff --git a/syscall b/syscall index a525620c81..745e9eb2bc 160000 --- a/syscall +++ b/syscall @@ -1 +1 @@ -Subproject commit a525620c818a801bb7038e111b71033eff56a3ee +Subproject commit 745e9eb2bc777d635c79fd23047c011c9c6e6165