linux_file.c (101706) | linux_file.c (102003) |
---|---|
1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 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 --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 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 --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/compat/linux/linux_file.c 101706 2002-08-12 01:18:33Z rwatson $ | 28 * $FreeBSD: head/sys/compat/linux/linux_file.c 102003 2002-08-17 02:36:16Z rwatson $ |
29 */ 30 31#include "opt_compat.h" 32#include "opt_mac.h" 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/conf.h> --- 101 unchanged lines hidden (view full) --- 138 if (!error && !(bsd_open_args.flags & O_NOCTTY) && 139 SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) { 140 struct file *fp; 141 142 error = fget(td, td->td_retval[0], &fp); 143 PROC_UNLOCK(p); 144 if (!error) { 145 if (fp->f_type == DTYPE_VNODE) | 29 */ 30 31#include "opt_compat.h" 32#include "opt_mac.h" 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/conf.h> --- 101 unchanged lines hidden (view full) --- 138 if (!error && !(bsd_open_args.flags & O_NOCTTY) && 139 SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) { 140 struct file *fp; 141 142 error = fget(td, td->td_retval[0], &fp); 143 PROC_UNLOCK(p); 144 if (!error) { 145 if (fp->f_type == DTYPE_VNODE) |
146 fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, td); | 146 fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, td->td_ucred, 147 td); |
147 fdrop(fp, td); 148 } 149 } else { 150 PROC_UNLOCK(p); 151#ifdef DEBUG 152 if (ldebug(open)) 153 printf(LMSG("open returns error %d"), error); 154#endif --- 1043 unchanged lines hidden --- | 148 fdrop(fp, td); 149 } 150 } else { 151 PROC_UNLOCK(p); 152#ifdef DEBUG 153 if (ldebug(open)) 154 printf(LMSG("open returns error %d"), error); 155#endif --- 1043 unchanged lines hidden --- |