linux_file.c (46571) | linux_file.c (46676) |
---|---|
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 * $Id: linux_file.c,v 1.23 1999/01/10 23:15:35 eivind Exp $ | 28 * $Id: linux_file.c,v 1.24 1999/05/06 18:44:20 peter Exp $ |
29 */ 30 31#include "opt_compat.h" 32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/sysproto.h> 36#include <sys/fcntl.h> --- 264 unchanged lines hidden (view full) --- 301 return fcntl(p, &fcntl_args); 302 } 303 vp = (struct vnode *)fp->f_data; 304 if (vp->v_type != VCHR) 305 return EINVAL; 306 if ((error = VOP_GETATTR(vp, &va, p->p_ucred, p))) 307 return error; 308 | 29 */ 30 31#include "opt_compat.h" 32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/sysproto.h> 36#include <sys/fcntl.h> --- 264 unchanged lines hidden (view full) --- 301 return fcntl(p, &fcntl_args); 302 } 303 vp = (struct vnode *)fp->f_data; 304 if (vp->v_type != VCHR) 305 return EINVAL; 306 if ((error = VOP_GETATTR(vp, &va, p->p_ucred, p))) 307 return error; 308 |
309 d_tty = cdevsw[major(va.va_rdev)]->d_devtotty; | 309 d_tty = devsw(va.va_rdev)->d_devtotty; |
310 if (!d_tty || (!(tp = (*d_tty)(va.va_rdev)))) 311 return EINVAL; 312 if (args->cmd == LINUX_F_GETOWN) { 313 p->p_retval[0] = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PID; 314 return 0; 315 } 316 if ((long)args->arg <= 0) { 317 pgid = -(long)args->arg; --- 514 unchanged lines hidden --- | 310 if (!d_tty || (!(tp = (*d_tty)(va.va_rdev)))) 311 return EINVAL; 312 if (args->cmd == LINUX_F_GETOWN) { 313 p->p_retval[0] = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PID; 314 return 0; 315 } 316 if ((long)args->arg <= 0) { 317 pgid = -(long)args->arg; --- 514 unchanged lines hidden --- |