Deleted Added
full compact
linux_ioctl.c (66834) linux_ioctl.c (68201)
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_ioctl.c 66834 2000-10-08 21:34:00Z phk $
28 * $FreeBSD: head/sys/compat/linux/linux_ioctl.c 68201 2000-11-01 19:48:35Z obrien $
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/sysproto.h>
34#include <sys/proc.h>
35#include <sys/cdio.h>
36#include <sys/consio.h>

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

46#include <net/if.h>
47#include <net/if_dl.h>
48#include <net/if_types.h>
49#include <sys/sockio.h>
50#include <sys/soundcard.h>
51#include <sys/disklabel.h>
52
53#include <machine/../linux/linux.h>
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/sysproto.h>
34#include <sys/proc.h>
35#include <sys/cdio.h>
36#include <sys/consio.h>

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

46#include <net/if.h>
47#include <net/if_dl.h>
48#include <net/if_types.h>
49#include <sys/sockio.h>
50#include <sys/soundcard.h>
51#include <sys/disklabel.h>
52
53#include <machine/../linux/linux.h>
54#ifdef __alpha__
55#include <linux_proto.h>
56#else
54#include <machine/../linux/linux_proto.h>
57#include <machine/../linux/linux_proto.h>
58#endif
59
60#include <linux_proto.h>
61#ifdef __alpha__
62#include <machine/../linux/linux_ioctl.h>
63#else
55#include <compat/linux/linux_ioctl.h>
64#include <compat/linux/linux_ioctl.h>
65#endif
56#include <compat/linux/linux_mib.h>
57#include <compat/linux/linux_util.h>
58
59static linux_ioctl_function_t linux_ioctl_cdrom;
60static linux_ioctl_function_t linux_ioctl_console;
61static linux_ioctl_function_t linux_ioctl_disk;
62static linux_ioctl_function_t linux_ioctl_socket;
63static linux_ioctl_function_t linux_ioctl_sound;

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

115 * termio related ioctls
116 */
117
118struct linux_termio {
119 unsigned short c_iflag;
120 unsigned short c_oflag;
121 unsigned short c_cflag;
122 unsigned short c_lflag;
66#include <compat/linux/linux_mib.h>
67#include <compat/linux/linux_util.h>
68
69static linux_ioctl_function_t linux_ioctl_cdrom;
70static linux_ioctl_function_t linux_ioctl_console;
71static linux_ioctl_function_t linux_ioctl_disk;
72static linux_ioctl_function_t linux_ioctl_socket;
73static linux_ioctl_function_t linux_ioctl_sound;

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

125 * termio related ioctls
126 */
127
128struct linux_termio {
129 unsigned short c_iflag;
130 unsigned short c_oflag;
131 unsigned short c_cflag;
132 unsigned short c_lflag;
133#ifdef __alpha__
134 unsigned char c_cc[LINUX_NCCS];
123 unsigned char c_line;
135 unsigned char c_line;
136 unsigned int c_ispeed;
137 unsigned int c_ospeed;
138#else
139 unsigned char c_line;
124 unsigned char c_cc[LINUX_NCC];
140 unsigned char c_cc[LINUX_NCC];
141#endif
125};
126
127struct linux_termios {
128 unsigned int c_iflag;
129 unsigned int c_oflag;
130 unsigned int c_cflag;
131 unsigned int c_lflag;
132 unsigned char c_line;

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

961
962 return (ENOIOCTL);
963}
964
965/*
966 * Sound related ioctls
967 */
968
142};
143
144struct linux_termios {
145 unsigned int c_iflag;
146 unsigned int c_oflag;
147 unsigned int c_cflag;
148 unsigned int c_lflag;
149 unsigned char c_line;

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

978
979 return (ENOIOCTL);
980}
981
982/*
983 * Sound related ioctls
984 */
985
969static unsigned dirbits[4] = { IOC_VOID, IOC_IN, IOC_OUT, IOC_INOUT };
986static u_int32_t dirbits[4] = { IOC_VOID, IOC_IN, IOC_OUT, IOC_INOUT };
970
971#define SETDIR(c) (((c) & ~IOC_DIRMASK) | dirbits[args->cmd >> 30])
972
973static int
974linux_ioctl_sound(struct proc *p, struct linux_ioctl_args *args)
975{
976
977 switch (args->cmd & 0xffff) {

--- 552 unchanged lines hidden ---
987
988#define SETDIR(c) (((c) & ~IOC_DIRMASK) | dirbits[args->cmd >> 30])
989
990static int
991linux_ioctl_sound(struct proc *p, struct linux_ioctl_args *args)
992{
993
994 switch (args->cmd & 0xffff) {

--- 552 unchanged lines hidden ---