Home | History | Annotate | Line # | Download | only in libsys_linux
linux_rump.c revision 1.1
      1 /*	$NetBSD: linux_rump.c,v 1.1 2013/12/14 10:29:45 njoly Exp $	*/
      2 
      3 #include <sys/param.h>
      4 
      5 #include <compat/linux/common/linux_types.h>
      6 #include <compat/linux/common/linux_signal.h>
      7 
      8 #include "rump_linux_syscallargs.h"
      9 
     10 /*
     11     compat/linux/arch/.../syscallargs.h and rump_linux_syscallargs.h
     12     define the same syscall arguments and prototypes, thus cannot be
     13     both used. Just copy needed linux stuff for now to avoid conflicts.
     14 */
     15 
     16 struct linux_sys_mknodat_args {
     17         syscallarg(int) fd;
     18         syscallarg(const char *) path;
     19         syscallarg(mode_t) mode;
     20         syscallarg(unsigned) dev;
     21 };
     22 check_syscall_args(linux_sys_mknodat)
     23 
     24 int     linux_sys_mknodat(struct lwp *, const struct linux_sys_mknodat_args *, register_t *);
     25 
     26 int
     27 rump_linux_sys_mknodat(struct lwp *l,
     28     const struct rump_linux_sys_mknodat_args *uap, register_t *retval)
     29 {
     30 	/* {
     31 		syscallarg(int) fd;
     32 		syscallarg(const char *) path;
     33 		syscallarg(mode_t) mode;
     34 		syscallarg(int) PAD;
     35 		syscallarg(dev_t) dev;
     36 	} */
     37 	struct linux_sys_mknodat_args ua;
     38 
     39 	SCARG(&ua, fd) = SCARG(uap, fd);
     40 	SCARG(&ua, path) = SCARG(uap, path);
     41 	SCARG(&ua, mode) = SCARG(uap, mode);
     42 	SCARG(&ua, dev) = SCARG(uap, dev);
     43 
     44 	return linux_sys_mknodat(l, &ua, retval);
     45 }
     46