Deleted Added
full compact
fifo_vnops.c (101983) fifo_vnops.c (102003)
1/*
2 * Copyright (c) 1990, 1993, 1995
3 * The Regents of the University of California. 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

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)fifo_vnops.c 8.10 (Berkeley) 5/27/95
1/*
2 * Copyright (c) 1990, 1993, 1995
3 * The Regents of the University of California. 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

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)fifo_vnops.c 8.10 (Berkeley) 5/27/95
34 * $FreeBSD: head/sys/fs/fifofs/fifo_vnops.c 101983 2002-08-16 12:52:03Z rwatson $
34 * $FreeBSD: head/sys/fs/fifofs/fifo_vnops.c 102003 2002-08-17 02:36:16Z rwatson $
35 */
36
37#include <sys/param.h>
38#include <sys/event.h>
39#include <sys/filio.h>
40#include <sys/fcntl.h>
41#include <sys/file.h>
42#include <sys/kernel.h>

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

343{
344 struct file filetmp; /* Local, so need not be locked. */
345 int error;
346
347 if (ap->a_command == FIONBIO)
348 return (0);
349 if (ap->a_fflag & FREAD) {
350 filetmp.f_data = (caddr_t)ap->a_vp->v_fifoinfo->fi_readsock;
35 */
36
37#include <sys/param.h>
38#include <sys/event.h>
39#include <sys/filio.h>
40#include <sys/fcntl.h>
41#include <sys/file.h>
42#include <sys/kernel.h>

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

343{
344 struct file filetmp; /* Local, so need not be locked. */
345 int error;
346
347 if (ap->a_command == FIONBIO)
348 return (0);
349 if (ap->a_fflag & FREAD) {
350 filetmp.f_data = (caddr_t)ap->a_vp->v_fifoinfo->fi_readsock;
351 error = soo_ioctl(&filetmp, ap->a_command, ap->a_data, ap->a_td);
351 filetmp.f_cred = ap->a_cred;
352 error = soo_ioctl(&filetmp, ap->a_command, ap->a_data,
353 ap->a_td->td_ucred, ap->a_td);
352 if (error)
353 return (error);
354 }
355 if (ap->a_fflag & FWRITE) {
356 filetmp.f_data = (caddr_t)ap->a_vp->v_fifoinfo->fi_writesock;
354 if (error)
355 return (error);
356 }
357 if (ap->a_fflag & FWRITE) {
358 filetmp.f_data = (caddr_t)ap->a_vp->v_fifoinfo->fi_writesock;
357 error = soo_ioctl(&filetmp, ap->a_command, ap->a_data, ap->a_td);
359 filetmp.f_cred = ap->a_cred;
360 error = soo_ioctl(&filetmp, ap->a_command, ap->a_data,
361 ap->a_td->td_ucred, ap->a_td);
358 if (error)
359 return (error);
360 }
361 return (0);
362}
363
364/* ARGSUSED */
365static int

--- 247 unchanged lines hidden ---
362 if (error)
363 return (error);
364 }
365 return (0);
366}
367
368/* ARGSUSED */
369static int

--- 247 unchanged lines hidden ---