diff options
-rw-r--r-- | lib/libc/arch/alpha/sys/pipe.S | 43 | ||||
-rw-r--r-- | lib/libc/arch/arm32/sys/pipe.S | 51 | ||||
-rw-r--r-- | lib/libc/arch/i386/sys/pipe.S | 49 | ||||
-rw-r--r-- | lib/libc/arch/m68k/sys/pipe.S | 50 | ||||
-rw-r--r-- | lib/libc/arch/m88k/sys/pipe.S | 55 | ||||
-rw-r--r-- | lib/libc/arch/mips/sys/pipe.S | 56 | ||||
-rw-r--r-- | lib/libc/arch/ns32k/sys/pipe.S | 29 | ||||
-rw-r--r-- | lib/libc/arch/powerpc/sys/pipe.S | 16 | ||||
-rw-r--r-- | lib/libc/arch/sparc/sys/pipe.S | 55 | ||||
-rw-r--r-- | lib/libc/arch/vax/sys/pipe.S | 46 | ||||
-rw-r--r-- | lib/libc/shlib_version | 3 | ||||
-rw-r--r-- | lib/libc/sys/Lint_pipe.c | 17 | ||||
-rw-r--r-- | lib/libc/sys/Makefile.inc | 10 | ||||
-rw-r--r-- | sys/compat/bsdos/syscalls.master | 4 | ||||
-rw-r--r-- | sys/compat/freebsd/syscalls.master | 4 | ||||
-rw-r--r-- | sys/compat/hpux/syscalls.master | 4 | ||||
-rw-r--r-- | sys/compat/ibcs2/syscalls.master | 4 | ||||
-rw-r--r-- | sys/compat/osf1/syscalls.master | 4 | ||||
-rw-r--r-- | sys/compat/sunos/syscalls.master | 4 | ||||
-rw-r--r-- | sys/compat/svr4/syscalls.master | 4 | ||||
-rw-r--r-- | sys/compat/ultrix/syscalls.master | 4 | ||||
-rw-r--r-- | sys/kern/sys_pipe.c | 4 | ||||
-rw-r--r-- | sys/kern/syscalls.master | 5 | ||||
-rw-r--r-- | sys/kern/uipc_syscalls.c | 30 |
24 files changed, 56 insertions, 495 deletions
diff --git a/lib/libc/arch/alpha/sys/pipe.S b/lib/libc/arch/alpha/sys/pipe.S deleted file mode 100644 index 9a3a2c8f379..00000000000 --- a/lib/libc/arch/alpha/sys/pipe.S +++ /dev/null @@ -1,43 +0,0 @@ -/* $OpenBSD: pipe.S,v 1.4 1999/02/04 06:22:35 d Exp $ */ -/* $NetBSD: pipe.S,v 1.1 1995/02/10 17:50:35 cgd Exp $ */ - -/* - * Copyright (c) 1994, 1995 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#include "SYS.h" - -#if defined(SYSLIBC_SCCS) - .text - .asciz "$OpenBSD: pipe.S,v 1.4 1999/02/04 06:22:35 d Exp $" -#endif /* SYSLIBC_SCCS */ - -SYSCALL(pipe) - stl v0, 0(a0) - stl a4, 4(a0) - mov zero, v0 - RET -SYSEND(pipe) diff --git a/lib/libc/arch/arm32/sys/pipe.S b/lib/libc/arch/arm32/sys/pipe.S deleted file mode 100644 index 516a7a4a7ac..00000000000 --- a/lib/libc/arch/arm32/sys/pipe.S +++ /dev/null @@ -1,51 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "SYS.h" - -#if defined(SYSLIBC_SCCS) - .text - .asciz "$OpenBSD: pipe.S,v 1.3 1996/08/19 08:11:56 tholo Exp $" -#endif /* SYSLIB_SCCS */ - - .text - .align 0 - -ENTRY(pipe) - mov r2, r0 - swi SYS_pipe - bcs cerror - str r0, [r2, #0x0000] - str r1, [r2, #0x0004] - mov r0, #0x00000000 - mov r15, r14 diff --git a/lib/libc/arch/i386/sys/pipe.S b/lib/libc/arch/i386/sys/pipe.S deleted file mode 100644 index d90a429e2fc..00000000000 --- a/lib/libc/arch/i386/sys/pipe.S +++ /dev/null @@ -1,49 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "SYS.h" - -#if defined(SYSLIBC_SCCS) - .text - .asciz "$OpenBSD: pipe.S,v 1.2 1996/08/19 08:13:33 tholo Exp $" -#endif /* SYSLIB_SCCS */ - -SYSCALL(pipe) - movl 4(%esp),%ecx - movl %eax,(%ecx) - movl %edx,4(%ecx) - xorl %eax,%eax - ret diff --git a/lib/libc/arch/m68k/sys/pipe.S b/lib/libc/arch/m68k/sys/pipe.S deleted file mode 100644 index 51263b4ae78..00000000000 --- a/lib/libc/arch/m68k/sys/pipe.S +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * the Systems Programming Group of the University of Utah Computer - * Science Department. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(SYSLIBC_SCCS) - .text - .asciz "$OpenBSD: pipe.S,v 1.2 1996/08/19 08:15:37 tholo Exp $" -#endif /* SYSLIBC_SCCS */ - -#include "SYS.h" - -SYSCALL(pipe) - movl sp@(4),a0 - movl d0,a0@+ - movl d1,a0@ - clrl d0 - rts diff --git a/lib/libc/arch/m88k/sys/pipe.S b/lib/libc/arch/m88k/sys/pipe.S deleted file mode 100644 index 720dbed8787..00000000000 --- a/lib/libc/arch/m88k/sys/pipe.S +++ /dev/null @@ -1,55 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * the Systems Programming Group of the University of Utah Computer - * Science Department. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) - .data - /*.asciz "from: @(#)pipe.s 5.1 (Berkeley) 5/12/90"*/ - .asciz "$Id: pipe.S,v 1.1 1998/12/15 07:10:33 smurph Exp $" - .text -#endif /* LIBC_SCCS and not lint */ - -#include "SYS.h" - -ENTRY(pipe) - or r4,r2,0 - or r13,r0,SYS_pipe - tb0 0,r0,128 - br cerror - st r2,r4,0 - st r3,r4,4 - jmp.n r1 - or r2,r0,0 diff --git a/lib/libc/arch/mips/sys/pipe.S b/lib/libc/arch/mips/sys/pipe.S deleted file mode 100644 index af15e39ce2b..00000000000 --- a/lib/libc/arch/mips/sys/pipe.S +++ /dev/null @@ -1,56 +0,0 @@ -/*- - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Ralph Campbell. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "SYS.h" - -#if defined(SYSLIBC_SCCS) - .text - .asciz "$OpenBSD: pipe.S,v 1.5 1999/01/19 01:38:53 d Exp $" -#endif /* SYSLIBC_SCCS */ - -SYSLEAF(pipe) - .set reorder - li v0, SYS_pipe # pipe(fildes) int fildes[2]; - syscall - bne a3, zero, 1f - sw v0, 0(a0) # store the two file descriptors - sw v1, 4(a0) - move v0, zero - j ra -1: - la t9, _C_LABEL(cerror) - jr t9 -SYSEND(pipe) diff --git a/lib/libc/arch/ns32k/sys/pipe.S b/lib/libc/arch/ns32k/sys/pipe.S deleted file mode 100644 index 228e6994808..00000000000 --- a/lib/libc/arch/ns32k/sys/pipe.S +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 1992 Helsinki University of Technology - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * HELSINKI UNIVERSITY OF TECHNOLOGY ALLOWS FREE USE OF THIS SOFTWARE IN - * ITS "AS IS" CONDITION. HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIMS ANY - * LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE - * USE OF THIS SOFTWARE. - */ - -#include <SYS.h> - -#if defined(SYSLIBC_SCCS) - .text - .asciz "$OpenBSD: pipe.S,v 1.2 1996/08/19 08:17:09 tholo Exp $" -#endif /* SYSLIBC_SCCS */ - -SYSCALL(pipe) - movd S_ARG0, r2 - movd r0, 0(r2) - movd r1, 4(r2) - movqd 0, r0 - ret 0 diff --git a/lib/libc/arch/powerpc/sys/pipe.S b/lib/libc/arch/powerpc/sys/pipe.S deleted file mode 100644 index 539a01c5aff..00000000000 --- a/lib/libc/arch/powerpc/sys/pipe.S +++ /dev/null @@ -1,16 +0,0 @@ -/* int sigsuspend(int *mask) */ - -#include "SYS.h" - - .text -PREFIX(pipe) - mr 5, 3 /* keep buf addr safe */ - sc - cmpwi 0, 0 - beq ok - b PIC_PLT(_ASM_LABEL(cerror)) - -ok: stw 3, 0(5) - stw 4, 4(5) - li 3, 0 - blr diff --git a/lib/libc/arch/sparc/sys/pipe.S b/lib/libc/arch/sparc/sys/pipe.S deleted file mode 100644 index b6c3cd67149..00000000000 --- a/lib/libc/arch/sparc/sys/pipe.S +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(SYSLIBC_SCCS) - .text - .asciz "$OpenBSD: pipe.S,v 1.3 1999/01/22 06:07:56 marc Exp $" -#endif /* SYSLIBC_SCCS */ - -#include "SYS.h" - -SYSENTRY(pipe) - mov %o0, %o2 ! save pointer - mov SYS_pipe, %g1 - t ST_SYSCALL ! pipe() - bcc,a 1f - st %o0, [%o2] ! success, store fds - ERROR() -1: - st %o1, [%o2 + 4] - retl ! and return 0 - clr %o0 diff --git a/lib/libc/arch/vax/sys/pipe.S b/lib/libc/arch/vax/sys/pipe.S deleted file mode 100644 index 69ef82001c7..00000000000 --- a/lib/libc/arch/vax/sys/pipe.S +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(SYSLIBC_SCCS) - .text - .asciz "$OpenBSD: pipe.S,v 1.2 1996/08/19 08:19:01 tholo Exp $" -#endif /* SYSLIBC_SCCS */ - -#include "SYS.h" - -SYSCALL(pipe) - movl 4(ap),r2 - movl r0,(r2)+ - movl r1,(r2) - clrl r0 - ret diff --git a/lib/libc/shlib_version b/lib/libc/shlib_version index 629f8a9fc41..59396e8debe 100644 --- a/lib/libc/shlib_version +++ b/lib/libc/shlib_version @@ -1,2 +1,3 @@ -major=22 +major=23 minor=0 + diff --git a/lib/libc/sys/Lint_pipe.c b/lib/libc/sys/Lint_pipe.c deleted file mode 100644 index df07e3e95b3..00000000000 --- a/lib/libc/sys/Lint_pipe.c +++ /dev/null @@ -1,17 +0,0 @@ -/* $OpenBSD: Lint_pipe.c,v 1.1 1998/02/08 22:45:10 tholo Exp $ */ -/* $NetBSD: Lint_pipe.c,v 1.1 1997/11/06 00:52:59 cgd Exp $ */ - -/* - * This file placed in the public domain. - * Chris Demetriou, November 5, 1997. - */ - -#include <unistd.h> - -/*ARGSUSED*/ -int -pipe(filedes) - int filedes[2]; -{ - return (0); -} diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 2d88002a700..91a714f31e3 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.29 1999/05/22 21:27:21 weingart Exp $ +# $OpenBSD: Makefile.inc,v 1.30 1999/06/07 07:17:56 deraadt Exp $ # $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $ # @(#)Makefile.inc 8.1 (Berkeley) 6/17/93 @@ -6,16 +6,16 @@ .PATH: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/sys ${LIBCSRCDIR}/sys # modules with non-default implementations on at least one architecture: -SRCS+= Ovfork.S brk.S cerror.S exect.S fork.S pipe.S \ +SRCS+= Ovfork.S brk.S cerror.S exect.S fork.S \ sbrk.S sigpending.S sigprocmask.S sigreturn.S \ sigsuspend.S syscall.S LSRCS+= Lint_Ovfork.c Lint_brk.c Lint_exect.c Lint_fork.c \ - Lint_pipe.c Lint_sbrk.c \ + Lint_sbrk.c \ Lint_sigpending.c Lint_sigprocmask.c Lint_sigreturn.c \ Lint_sigsuspend.c Lint_syscall.c DPSRCS+= Lint_Ovfork.c Lint_brk.c Lint_exect.c Lint_fork.c \ - Lint_pipe.c Lint_sbrk.c \ + Lint_sbrk.c \ Lint_sigpending.c Lint_sigprocmask.c Lint_sigreturn.c \ Lint_sigsuspend.c Lint_syscall.c @@ -43,7 +43,7 @@ ASM= accept.o access.o acct.o adjtime.o bind.o chdir.o chflags.o chmod.o \ mount.o mprotect.o msgctl.o msgget.o msgrcv.o msgsnd.o msync.o \ munlock.o munmap.o nanosleep.o nfssvc.o \ ntp_gettime.o ntp_adjtime.o \ - open.o pathconf.o poll.o profil.o quotactl.o \ + open.o pathconf.o pipe.o poll.o profil.o quotactl.o \ read.o readlink.o readv.o reboot.o recvfrom.o recvmsg.o rename.o \ revoke.o rfork.o \ rmdir.o select.o semconfig.o semget.o semop.o sendmsg.o sendto.o \ diff --git a/sys/compat/bsdos/syscalls.master b/sys/compat/bsdos/syscalls.master index fe90384f933..af947a3ddce 100644 --- a/sys/compat/bsdos/syscalls.master +++ b/sys/compat/bsdos/syscalls.master @@ -1,4 +1,4 @@ - $OpenBSD: syscalls.master,v 1.4 1999/05/31 17:34:44 millert Exp $ + $OpenBSD: syscalls.master,v 1.5 1999/06/07 07:17:46 deraadt Exp $ ; OpenBSD COMPAT_BSDOS system call name/number "master" file. ; (See syscalls.conf to see what it is processed into.) @@ -97,7 +97,7 @@ 40 NOARGS { int compat_43_sys_lstat(char *path, \ struct ostat *ub); } olstat 41 NOARGS { int sys_dup(u_int fd); } -42 NOARGS { int sys_pipe(void); } +42 NOARGS { int sys_opipe(void); } 43 NOARGS { gid_t sys_getegid(void); } 44 NOARGS { int sys_profil(caddr_t samples, u_int size, \ u_int offset, u_int scale); } diff --git a/sys/compat/freebsd/syscalls.master b/sys/compat/freebsd/syscalls.master index d6f0df89b23..5c25a57e31c 100644 --- a/sys/compat/freebsd/syscalls.master +++ b/sys/compat/freebsd/syscalls.master @@ -1,4 +1,4 @@ - $OpenBSD: syscalls.master,v 1.10 1999/05/31 17:34:45 millert Exp $ + $OpenBSD: syscalls.master,v 1.11 1999/06/07 07:17:46 deraadt Exp $ ; $NetBSD: syscalls.master,v 1.3 1995/10/10 18:28:40 mycroft Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -104,7 +104,7 @@ 40 STD { int compat_43_freebsd_sys_lstat(char *path, \ struct ostat *ub); } olstat 41 NOARGS { int sys_dup(u_int fd); } -42 NOARGS { int sys_pipe(void); } +42 NOARGS { int sys_opipe(void); } 43 NOARGS { gid_t sys_getegid(void); } 44 NOARGS { int sys_profil(caddr_t samples, u_int size, \ u_int offset, u_int scale); } diff --git a/sys/compat/hpux/syscalls.master b/sys/compat/hpux/syscalls.master index 34d934169f9..ab31f1556fc 100644 --- a/sys/compat/hpux/syscalls.master +++ b/sys/compat/hpux/syscalls.master @@ -1,4 +1,4 @@ - $OpenBSD: syscalls.master,v 1.5 1997/03/26 08:11:09 downsj Exp $ + $OpenBSD: syscalls.master,v 1.6 1999/06/07 07:17:46 deraadt Exp $ ; $NetBSD: syscalls.master,v 1.13 1997/03/16 03:48:04 thorpej Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -90,7 +90,7 @@ 39 STD { int hpux_sys_setpgrp_6x(void); } 40 STD { int hpux_sys_lstat(char *path, struct hpux_stat *sb); } 41 STD { int hpux_sys_dup(int fd); } -42 NOARGS { int sys_pipe(void); } +42 NOARGS { int sys_opipe(void); } 43 STD { int hpux_sys_times_6x(struct tms *tms); } 44 NOARGS { int sys_profil(caddr_t samples, u_int size, \ u_int offset, u_int scale); } diff --git a/sys/compat/ibcs2/syscalls.master b/sys/compat/ibcs2/syscalls.master index a56e1b66b86..70ca3f47c9f 100644 --- a/sys/compat/ibcs2/syscalls.master +++ b/sys/compat/ibcs2/syscalls.master @@ -1,4 +1,4 @@ - $OpenBSD: syscalls.master,v 1.6 1997/01/23 16:12:20 niklas Exp $ + $OpenBSD: syscalls.master,v 1.7 1999/06/07 07:17:47 deraadt Exp $ ; $NetBSD: syscalls.master,v 1.10 1996/09/07 14:21:59 mycroft Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -93,7 +93,7 @@ int pid, int pgid); } 40 UNIMPL ibcs2_xenix 41 NOARGS { int sys_dup(u_int fd); } -42 NOARGS { int sys_pipe(void); } +42 NOARGS { int sys_opipe(void); } 43 STD { int ibcs2_sys_times(struct tms *tp); } 44 UNIMPL profil 45 STD { int ibcs2_sys_plock(int cmd); } diff --git a/sys/compat/osf1/syscalls.master b/sys/compat/osf1/syscalls.master index 27726a49fdb..06a877c40ce 100644 --- a/sys/compat/osf1/syscalls.master +++ b/sys/compat/osf1/syscalls.master @@ -1,4 +1,4 @@ - $OpenBSD: syscalls.master,v 1.5 1998/02/17 01:48:07 millert Exp $ + $OpenBSD: syscalls.master,v 1.6 1999/06/07 07:17:47 deraadt Exp $ ; $NetBSD: syscalls.master,v 1.2 1995/10/07 06:27:28 mycroft Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -87,7 +87,7 @@ 39 NOARGS { int sys_setpgid(int pid, int pgid); } 40 UNIMPL old lstat 41 NOARGS { int sys_dup(u_int fd); } -42 NOARGS { int sys_pipe(void); } +42 NOARGS { int sys_opipe(void); } 43 UNIMPL set_program_attributes 44 UNIMPL profil 45 STD { int osf1_sys_open(char *path, int flags, int mode); } diff --git a/sys/compat/sunos/syscalls.master b/sys/compat/sunos/syscalls.master index f4e9b956a64..fe1fe06e37c 100644 --- a/sys/compat/sunos/syscalls.master +++ b/sys/compat/sunos/syscalls.master @@ -1,4 +1,4 @@ - $OpenBSD: syscalls.master,v 1.10 1998/03/23 07:12:40 millert Exp $ + $OpenBSD: syscalls.master,v 1.11 1999/06/07 07:17:48 deraadt Exp $ ; $NetBSD: syscalls.master,v 1.33 1996/02/28 16:05:43 pk Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -86,7 +86,7 @@ 39 UNIMPL sunos_setpgrp 40 STD { int sunos_sys_lstat(char *path, struct ostat *ub); } 41 NOARGS { int sys_dup(u_int fd); } -42 NOARGS { int sys_pipe(void); } +42 NOARGS { int sys_opipe(void); } 43 STD { int sunos_sys_otimes(struct tms *tp); } 44 NOARGS { int sys_profil(caddr_t samples, u_int size, \ u_int offset, u_int scale); } diff --git a/sys/compat/svr4/syscalls.master b/sys/compat/svr4/syscalls.master index 64840be13f7..1abb1a1ff86 100644 --- a/sys/compat/svr4/syscalls.master +++ b/sys/compat/svr4/syscalls.master @@ -1,4 +1,4 @@ - $OpenBSD: syscalls.master,v 1.23 1998/03/06 21:58:10 niklas Exp $ + $OpenBSD: syscalls.master,v 1.24 1999/06/07 07:17:48 deraadt Exp $ ; $NetBSD: syscalls.master,v 1.17 1996/02/10 17:12:51 christos Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -90,7 +90,7 @@ 39 STD { int svr4_sys_pgrpsys(int cmd, int pid, int pgid); } 40 UNIMPL xenix 41 NOARGS { int sys_dup(u_int fd); } -42 NOARGS { int sys_pipe(void); } +42 NOARGS { int sys_opipe(void); } 43 STD { int svr4_sys_times(struct tms *tp); } 44 UNIMPL profil 45 UNIMPL plock diff --git a/sys/compat/ultrix/syscalls.master b/sys/compat/ultrix/syscalls.master index d07afb73214..113e7b5c97c 100644 --- a/sys/compat/ultrix/syscalls.master +++ b/sys/compat/ultrix/syscalls.master @@ -1,4 +1,4 @@ - $OpenBSD: syscalls.master,v 1.6 1997/01/26 23:52:04 downsj Exp $ + $OpenBSD: syscalls.master,v 1.7 1999/06/07 07:17:48 deraadt Exp $ ; $NetBSD: syscalls.master,v 1.15 1996/01/07 13:38:57 jonathan Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -86,7 +86,7 @@ 40 STD { int ultrix_sys_lstat(char *path, \ struct ostat *ub); } olstat 41 NOARGS { int sys_dup(u_int fd); } -42 NOARGS { int sys_pipe(void); } +42 NOARGS { int sys_opipe(void); } 43 OBSOL v7 times 44 NOARGS { int sys_profil(caddr_t samples, u_int size, \ u_int offset, u_int scale); } diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index ebc661bb095..f14e55a005f 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_pipe.c,v 1.12 1999/06/07 01:41:01 deraadt Exp $ */ +/* $OpenBSD: sys_pipe.c,v 1.13 1999/06/07 07:17:42 deraadt Exp $ */ /* * Copyright (c) 1996 John S. Dyson @@ -156,7 +156,7 @@ int #if defined(__FreeBSD__) pipe(p, uap, retval) #else /* (__NetBSD__) || (__OpenBSD__) */ -sys_pipe(p, v, retval) +sys_opipe(p, v, retval) #endif struct proc *p; void *v; diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 58e865bef0f..f3bbc850c38 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ -; $OpenBSD: syscalls.master,v 1.36 1999/05/31 17:34:47 millert Exp $ +; $OpenBSD: syscalls.master,v 1.37 1999/06/07 07:17:42 deraadt Exp $ ; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -107,7 +107,7 @@ 40 COMPAT_43 { int sys_lstat(char *path, \ struct ostat *ub); } olstat 41 STD { int sys_dup(int fd); } -42 STD { int sys_pipe(void); } +42 STD { int sys_opipe(void); } 43 STD { gid_t sys_getegid(void); } 44 STD { int sys_profil(caddr_t samples, size_t size, \ u_long offset, u_int scale); } @@ -519,3 +519,4 @@ 261 STD { int sys_statfs(const char *path, \ struct statfs *buf); } 262 STD { int sys_fstatfs(int fd, struct statfs *buf); } +263 STD { int sys_pipe(int *fdp); } diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index cff7ebce68b..99a511eaf34 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_syscalls.c,v 1.21 1999/06/07 01:40:01 deraadt Exp $ */ +/* $OpenBSD: uipc_syscalls.c,v 1.22 1999/06/07 07:17:42 deraadt Exp $ */ /* $NetBSD: uipc_syscalls.c,v 1.19 1996/02/09 19:00:48 christos Exp $ */ /* @@ -835,10 +835,36 @@ sys_getsockopt(p, v, retval) return (error); } +int +sys_pipe(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + register struct filedesc *fdp = p->p_fd; + register struct sys_pipe_args /* { + syscallarg(int *) fdp; + } */ *uap = v; + int error; + + if ((error = sys_opipe(p, v, retval)) == -1) + return (error); + + error = copyout((caddr_t)retval, (caddr_t)SCARG(uap, fdp), + 2 * sizeof (int)); + if (error) { + ffree(fdp->fd_ofiles[retval[0]]); + fdp->fd_ofiles[retval[0]] = NULL; + ffree(fdp->fd_ofiles[retval[1]]); + fdp->fd_ofiles[retval[1]] = NULL; + } + return (error); +} + #ifdef OLD_PIPE /* ARGSUSED */ int -sys_pipe(p, v, retval) +sys_opipe(p, v, retval) struct proc *p; void *v; register_t *retval; |