Removed support for OLD_PIPE. <sys/stat.h> is now missing the hack that
supported nameless pipes being indistinguishable from fifos. We're not going back.
This commit is contained in:
parent
71426610ff
commit
9dd8309d56
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
|
||||
* $Id$
|
||||
* $Id: kern_descrip.c,v 1.37 1997/02/22 09:39:03 peter Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -429,11 +429,9 @@ ofstat(p, uap, retval)
|
||||
error = soo_stat((struct socket *)fp->f_data, &ub);
|
||||
break;
|
||||
|
||||
#ifndef OLD_PIPE
|
||||
case DTYPE_PIPE:
|
||||
error = pipe_stat((struct pipe *)fp->f_data, &ub);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
panic("ofstat");
|
||||
@ -481,11 +479,9 @@ fstat(p, uap, retval)
|
||||
error = soo_stat((struct socket *)fp->f_data, &ub);
|
||||
break;
|
||||
|
||||
#ifndef OLD_PIPE
|
||||
case DTYPE_PIPE:
|
||||
error = pipe_stat((struct pipe *)fp->f_data, &ub);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
panic("fstat");
|
||||
@ -521,9 +517,7 @@ fpathconf(p, uap, retval)
|
||||
return (EBADF);
|
||||
switch (fp->f_type) {
|
||||
|
||||
#ifndef OLD_PIPE
|
||||
case DTYPE_PIPE:
|
||||
#endif
|
||||
case DTYPE_SOCKET:
|
||||
if (uap->name != _PC_PIPE_BUF)
|
||||
return (EINVAL);
|
||||
|
@ -16,11 +16,9 @@
|
||||
* 4. Modifications may be freely made to this file if the above conditions
|
||||
* are met.
|
||||
*
|
||||
* $Id: sys_pipe.c,v 1.26 1997/03/23 03:36:24 bde Exp $
|
||||
* $Id: sys_pipe.c,v 1.27 1997/03/24 11:52:26 bde Exp $
|
||||
*/
|
||||
|
||||
#ifndef OLD_PIPE
|
||||
|
||||
/*
|
||||
* This file contains a high-performance replacement for the socket-based
|
||||
* pipes scheme originally used in FreeBSD/4.4Lite. It does not support
|
||||
@ -1104,4 +1102,3 @@ pipeclose(cpipe)
|
||||
free(cpipe, M_TEMP);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94
|
||||
* $Id: uipc_syscalls.c,v 1.23 1997/03/23 03:36:32 bde Exp $
|
||||
* $Id: uipc_syscalls.c,v 1.24 1997/03/31 12:30:01 davidg Exp $
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
@ -1063,60 +1063,6 @@ getsockopt(p, uap, retval)
|
||||
return (error);
|
||||
}
|
||||
|
||||
#ifdef OLD_PIPE
|
||||
/* ARGSUSED */
|
||||
int
|
||||
pipe(p, uap, retval)
|
||||
struct proc *p;
|
||||
struct pipe_args /* {
|
||||
int dummy;
|
||||
} */ *uap;
|
||||
int retval[];
|
||||
{
|
||||
register struct filedesc *fdp = p->p_fd;
|
||||
struct file *rf, *wf;
|
||||
struct socket *rso, *wso;
|
||||
int fd, error;
|
||||
|
||||
error = socreate(AF_UNIX, &rso, SOCK_STREAM, 0, p);
|
||||
if (error)
|
||||
return (error);
|
||||
error = socreate(AF_UNIX, &wso, SOCK_STREAM, 0, p);
|
||||
if (error)
|
||||
goto free1;
|
||||
error = falloc(p, &rf, &fd);
|
||||
if (error)
|
||||
goto free2;
|
||||
retval[0] = fd;
|
||||
rf->f_flag = FREAD | FWRITE;
|
||||
rf->f_type = DTYPE_SOCKET;
|
||||
rf->f_ops = &socketops;
|
||||
rf->f_data = (caddr_t)rso;
|
||||
error = falloc(p, &wf, &fd);
|
||||
if (error)
|
||||
goto free3;
|
||||
wf->f_flag = FREAD | FWRITE;
|
||||
wf->f_type = DTYPE_SOCKET;
|
||||
wf->f_ops = &socketops;
|
||||
wf->f_data = (caddr_t)wso;
|
||||
retval[1] = fd;
|
||||
error = unp_connect2(wso, rso);
|
||||
if (error)
|
||||
goto free4;
|
||||
return (0);
|
||||
free4:
|
||||
ffree(wf);
|
||||
fdp->fd_ofiles[retval[1]] = 0;
|
||||
free3:
|
||||
ffree(rf);
|
||||
fdp->fd_ofiles[retval[0]] = 0;
|
||||
free2:
|
||||
(void)soclose(wso);
|
||||
free1:
|
||||
(void)soclose(rso);
|
||||
return (error);
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* Get socket name.
|
||||
*/
|
||||
|
@ -18,14 +18,12 @@
|
||||
* 5. Modifications may be freely made to this file if the above conditions
|
||||
* are met.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: pipe.h,v 1.8 1997/02/22 09:45:40 peter Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_PIPE_H_
|
||||
#define _SYS_PIPE_H_
|
||||
|
||||
#ifndef OLD_PIPE
|
||||
|
||||
#ifndef KERNEL
|
||||
#include <sys/time.h> /* for struct timeval */
|
||||
#include <sys/select.h> /* for struct selinfo */
|
||||
@ -114,6 +112,4 @@ struct pipe {
|
||||
int pipe_stat __P((struct pipe *pipe, struct stat *ub));
|
||||
#endif
|
||||
|
||||
#endif /* !OLD_PIPE */
|
||||
|
||||
#endif /* !_SYS_PIPE_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user