Home | History | Annotate | Line # | Download | only in amd64
linux32_missing.h revision 1.5
      1 /*	$NetBSD: linux32_missing.h,v 1.5 2008/01/15 22:38:35 njoly 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(void *) 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_gid16_t *) gidset;
     82 };
     83 
     84 struct linux_sys_setgroups16_args {
     85         syscallarg(int) gidsetsize;
     86         syscallarg(linux_gid16_t *) gidset;
     87 };
     88 
     89 #ifdef _KERNEL
     90 __BEGIN_DECLS
     91 #define SYS_DEF(foo) struct foo##_args; \
     92 	int foo(lwp_t *, const struct foo##_args *, register_t *)
     93 SYS_DEF(linux_sys_old_mmap);
     94 SYS_DEF(linux_sys_ugetrlimit);
     95 SYS_DEF(linux_sys_fcntl64);
     96 SYS_DEF(linux_sys_llseek);
     97 SYS_DEF(linux_sys_setresuid16);
     98 SYS_DEF(linux_sys_setresgid16);
     99 SYS_DEF(linux_sys_nice);
    100 SYS_DEF(linux_sys_getgroups16);
    101 SYS_DEF(linux_sys_setgroups16);
    102 // SYS_DEF(linux_sys_mmap2);
    103 #undef SYS_DEF
    104 __END_DECLS
    105 #endif /* !_KERNEL */
    106 
    107 #endif /* _I386_LINUX32_MISSING_H */
    108