1 /* $NetBSD: linux32_missing.h,v 1.2 2006/09/13 19:55:49 manu Exp $ */ 2 3 /*- 4 * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 3. All advertising materials mentioning features or use of this software 15 * must display the following acknowledgement: 16 * This product includes software developed by Emmanuel Dreyfus 17 * 4. The name of the author may not be used to endorse or promote 18 * products derived from this software without specific prior written 19 * permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE THE AUTHOR AND CONTRIBUTORS ``AS IS'' 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 23 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 24 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 * POSSIBILITY OF SUCH DAMAGE. 32 */ 33 #ifndef _I386_LINUX32_MISSING_H 34 #define _I386_LINUX32_MISSING_H 35 36 #include <compat/netbsd32/netbsd32.h> 37 #include <compat/linux/common/linux_types.h> 38 39 /* 40 * system calls not defined for COMPAT_LINUX/amd64 41 * but needed for COMPAT_LINUX32 42 */ 43 struct linux_sys_old_mmap_args { 44 syscallarg(struct linux_oldmmap *) lmp; 45 }; 46 struct linux_sys_ugetrlimit_args { 47 syscallarg(int) which; 48 syscallarg(struct orlimit *) rlp; 49 }; 50 struct linux_sys_fcntl64_args { 51 syscallarg(int) fd; 52 syscallarg(int) cmd; 53 syscallarg(void *) arg; 54 }; 55 struct linux_sys_llseek_args { 56 syscallarg(int) fd; 57 syscallarg(u_int32_t) ohigh; 58 syscallarg(u_int32_t) olow; 59 syscallarg(caddr_t) res; 60 syscallarg(int) whence; 61 }; 62 63 struct linux_sys_setresgid16_args { 64 syscallarg(gid_t) rgid; 65 syscallarg(gid_t) egid; 66 syscallarg(gid_t) sgid; 67 }; 68 69 struct linux_sys_setresuid16_args { 70 syscallarg(uid_t) ruid; 71 syscallarg(uid_t) euid; 72 syscallarg(uid_t) suid; 73 }; 74 75 struct linux_sys_nice_args { 76 syscallarg(int) incr; 77 }; 78 79 struct linux_sys_getgroups16_args { 80 syscallarg(int) gidsetsize; 81 syscallarg(linux_gid_t *) gidset; 82 }; 83 84 struct linux_sys_setgroups16_args { 85 syscallarg(int) gidsetsize; 86 syscallarg(linux_gid_t *) gidset; 87 }; 88 89 struct linux_sys_mmap2_args { 90 syscallarg(unsigned long) addr; 91 syscallarg(size_t) len; 92 syscallarg(int) prot; 93 syscallarg(int) flags; 94 syscallarg(int) fd; 95 syscallarg(linux_off_t) offset; 96 }; 97 98 #ifdef _KERNEL 99 __BEGIN_DECLS 100 int linux_sys_old_mmap(struct lwp *, void *, register_t *); 101 int linux_sys_ugetrlimit(struct lwp *, void *, register_t *); 102 int linux_sys_fcntl64(struct lwp *, void *, register_t *); 103 int linux_sys_llseek(struct lwp *, void *, register_t *); 104 int linux_sys_setresuid16(struct lwp *, void *, register_t *); 105 int linux_sys_setresgid16(struct lwp *, void *, register_t *); 106 int linux_sys_nice(struct lwp *, void *, register_t *); 107 int linux_sys_getgroups16(struct lwp *, void *, register_t *); 108 int linux_sys_setgroups16(struct lwp *, void *, register_t *); 109 int linux_sys_mmap2(struct lwp *, void *, register_t *); 110 __END_DECLS 111 #endif /* !_KERNEL */ 112 113 #endif /* _I386_LINUX32_MISSING_H */ 114