Deleted Added
full compact
ibcs2_fcntl.c (33071) ibcs2_fcntl.c (46568)
1/*
2 * Copyright (c) 1995 Scott Bartram
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 10 unchanged lines hidden (view full) ---

19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
1/*
2 * Copyright (c) 1995 Scott Bartram
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 10 unchanged lines hidden (view full) ---

19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * $Id: ibcs2_fcntl.c,v 1.10 1997/11/06 19:28:24 phk Exp $
27 * $Id: ibcs2_fcntl.c,v 1.11 1998/02/04 04:12:28 eivind Exp $
28 */
29
30#include "opt_spx_hack.h"
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/fcntl.h>
35#include <sys/file.h>

--- 142 unchanged lines hidden (view full) ---

178 SCARG(uap, flags) = cvt_o_flags(SCARG(uap, flags));
179 if (SCARG(uap, flags) & O_CREAT)
180 CHECKALTCREAT(p, &sg, SCARG(uap, path));
181 else
182 CHECKALTEXIST(p, &sg, SCARG(uap, path));
183 ret = open(p, (struct open_args *)uap);
184
185#ifdef SPX_HACK
28 */
29
30#include "opt_spx_hack.h"
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/fcntl.h>
35#include <sys/file.h>

--- 142 unchanged lines hidden (view full) ---

178 SCARG(uap, flags) = cvt_o_flags(SCARG(uap, flags));
179 if (SCARG(uap, flags) & O_CREAT)
180 CHECKALTCREAT(p, &sg, SCARG(uap, path));
181 else
182 CHECKALTEXIST(p, &sg, SCARG(uap, path));
183 ret = open(p, (struct open_args *)uap);
184
185#ifdef SPX_HACK
186 if(ret == ENXIO)
187 if(!strcmp(SCARG(uap, path), "/compat/ibcs2/dev/spx"))
186 if (ret == ENXIO) {
187 if (!strcmp(SCARG(uap, path), "/compat/ibcs2/dev/spx"))
188 ret = spx_open(p, uap);
188 ret = spx_open(p, uap);
189 else
189 } else
190#endif /* SPX_HACK */
191 if (!ret && !noctty && SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
192 struct filedesc *fdp = p->p_fd;
193 struct file *fp = fdp->fd_ofiles[p->p_retval[0]];
194
195 /* ignore any error, just give it a try */
196 if (fp->f_type == DTYPE_VNODE)
197 (fp->f_ops->fo_ioctl)(fp, TIOCSCTTY, (caddr_t) 0, p);

--- 128 unchanged lines hidden ---
190#endif /* SPX_HACK */
191 if (!ret && !noctty && SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
192 struct filedesc *fdp = p->p_fd;
193 struct file *fp = fdp->fd_ofiles[p->p_retval[0]];
194
195 /* ignore any error, just give it a try */
196 if (fp->f_type == DTYPE_VNODE)
197 (fp->f_ops->fo_ioctl)(fp, TIOCSCTTY, (caddr_t) 0, p);

--- 128 unchanged lines hidden ---