Deleted Added
full compact
tdfx_pci.c (89306) tdfx_pci.c (89319)
1/*
2 * Copyright (c) 2000-2001 by Coleman Kane <cokane@FreeBSD.org>
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

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

23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
1/*
2 * Copyright (c) 2000-2001 by Coleman Kane <cokane@FreeBSD.org>
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

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

23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31 * $FreeBSD: head/sys/dev/tdfx/tdfx_pci.c 89306 2002-01-13 11:58:06Z alfred $
31 * $FreeBSD: head/sys/dev/tdfx/tdfx_pci.c 89319 2002-01-14 00:13:45Z alfred $
32 */
33
34/* 3dfx driver for FreeBSD 4.x - Finished 11 May 2000, 12:25AM ET
35 *
36 * Copyright (C) 2000-2001, by Coleman Kane <cokane@FreeBSD.org>,
37 * based upon the 3dfx driver written for linux, by Daryll Straus, Jon Taylor,
38 * and Jens Axboe, located at http://linux.3dfx.com.
39 */

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

839 u_long cmd = args->cmd & 0xffff;
840
841 /* The structure passed to ioctl has two shorts, one int
842 and one void*. */
843 char d_pio[2*sizeof(short) + sizeof(int) + sizeof(void*)];
844
845 struct file *fp;
846
32 */
33
34/* 3dfx driver for FreeBSD 4.x - Finished 11 May 2000, 12:25AM ET
35 *
36 * Copyright (C) 2000-2001, by Coleman Kane <cokane@FreeBSD.org>,
37 * based upon the 3dfx driver written for linux, by Daryll Straus, Jon Taylor,
38 * and Jens Axboe, located at http://linux.3dfx.com.
39 */

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

839 u_long cmd = args->cmd & 0xffff;
840
841 /* The structure passed to ioctl has two shorts, one int
842 and one void*. */
843 char d_pio[2*sizeof(short) + sizeof(int) + sizeof(void*)];
844
845 struct file *fp;
846
847 fp = ffind_hold(td, args->fd);
848 if (fp == NULL)
849 return (EBADF);
847 if ((error = fget(td, args->fd, &fp)) != 0)
848 return (error);
850 /* We simply copy the data and send it right to ioctl */
851 copyin((caddr_t)args->arg, &d_pio, sizeof(d_pio));
852 error = fo_ioctl(fp, cmd, (caddr_t)&d_pio, td);
853 fdrop(fp, td);
854 return error;
855}
856#endif /* TDFX_LINUX */
857

--- 13 unchanged lines hidden ---
849 /* We simply copy the data and send it right to ioctl */
850 copyin((caddr_t)args->arg, &d_pio, sizeof(d_pio));
851 error = fo_ioctl(fp, cmd, (caddr_t)&d_pio, td);
852 fdrop(fp, td);
853 return error;
854}
855#endif /* TDFX_LINUX */
856

--- 13 unchanged lines hidden ---