From 887a2b78c7a253d7959dc777629e5ed8cc5149fa Mon Sep 17 00:00:00 2001 From: pooka Date: Mon, 17 Jan 2011 18:25:17 +0000 Subject: [PATCH] regen: more compat syscalls --- sys/rump/include/rump/rump_syscalls.h | 10 +-- sys/rump/librump/rumpkern/rump_syscalls.c | 84 ++++++++++++++++++++--- 2 files changed, 80 insertions(+), 14 deletions(-) diff --git a/sys/rump/include/rump/rump_syscalls.h b/sys/rump/include/rump/rump_syscalls.h index ea453400c7d2..000f595361ce 100644 --- a/sys/rump/include/rump/rump_syscalls.h +++ b/sys/rump/include/rump/rump_syscalls.h @@ -1,10 +1,10 @@ -/* $NetBSD: rump_syscalls.h,v 1.38 2011/01/17 16:24:04 pooka Exp $ */ +/* $NetBSD: rump_syscalls.h,v 1.39 2011/01/17 18:25:17 pooka Exp $ */ /* * System call protos in rump namespace. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.241 2011/01/17 16:21:40 pooka Exp + * created from NetBSD: syscalls.master,v 1.242 2011/01/17 18:24:17 pooka Exp */ #ifndef _RUMP_RUMP_SYSCALLS_H_ @@ -632,6 +632,7 @@ int rump_sys_link(const char *, const char *) __RENAME(RUMP_SYS_RENAME_LINK); int rump_sys_unlink(const char *) __RENAME(RUMP_SYS_RENAME_UNLINK); int rump_sys_chdir(const char *) __RENAME(RUMP_SYS_RENAME_CHDIR); int rump_sys_fchdir(int) __RENAME(RUMP_SYS_RENAME_FCHDIR); +int rump_sys_mknod(const char *, mode_t, uint32_t) __RENAME(RUMP_SYS_RENAME_MKNOD); int rump_sys_chmod(const char *, mode_t) __RENAME(RUMP_SYS_RENAME_CHMOD); int rump_sys_chown(const char *, uid_t, gid_t) __RENAME(RUMP_SYS_RENAME_CHOWN); pid_t rump_sys_getpid(void) __RENAME(RUMP_SYS_RENAME_GETPID_WITH_PPID); @@ -746,6 +747,7 @@ int rump_sys_extattr_delete_link(const char *, int, const char *) __RENAME(RUMP_ ssize_t rump_sys_extattr_list_fd(int, int, void *, size_t) __RENAME(RUMP_SYS_RENAME_EXTATTR_LIST_FD); ssize_t rump_sys_extattr_list_file(const char *, int, void *, size_t) __RENAME(RUMP_SYS_RENAME_EXTATTR_LIST_FILE); ssize_t rump_sys_extattr_list_link(const char *, int, void *, size_t) __RENAME(RUMP_SYS_RENAME_EXTATTR_LIST_LINK); +int rump_sys_pselect(int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *) __RENAME(RUMP_SYS_RENAME_PSELECT); int rump_sys_pollts(struct pollfd *, u_int, const struct timespec *, const sigset_t *) __RENAME(RUMP_SYS_RENAME_POLLTS); int rump_sys_setxattr(const char *, const char *, void *, size_t, int) __RENAME(RUMP_SYS_RENAME_SETXATTR); int rump_sys_lsetxattr(const char *, const char *, void *, size_t, int) __RENAME(RUMP_SYS_RENAME_LSETXATTR); @@ -767,11 +769,9 @@ int rump_sys_socket(int, int, int) __RENAME(RUMP_SYS_RENAME_SOCKET); int rump_sys_getfh(const char *, void *, size_t *) __RENAME(RUMP_SYS_RENAME_GETFH); int rump_sys_fhopen(const void *, size_t, int) __RENAME(RUMP_SYS_RENAME_FHOPEN); int rump_sys_fhstatvfs1(const void *, size_t, struct statvfs *, int) __RENAME(RUMP_SYS_RENAME_FHSTATVFS1); +int rump_sys_fhstat(const void *, size_t, struct stat *) __RENAME(RUMP_SYS_RENAME_FHSTAT); int rump_sys_mount(const char *, const char *, int, void *, size_t) __RENAME(RUMP_SYS_RENAME_MOUNT); int rump_sys_posix_fadvise(int, off_t, off_t, int) __RENAME(RUMP_SYS_RENAME_POSIX_FADVISE); -int rump_sys_pselect(int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *) __RENAME(RUMP_SYS_RENAME_PSELECT); -int rump_sys_mknod(const char *, mode_t, dev_t) __RENAME(RUMP_SYS_RENAME_MKNOD); -int rump_sys_fhstat(const void *, size_t, struct stat *) __RENAME(RUMP_SYS_RENAME_FHSTAT); int rump_sys_pipe(int *); #endif /* _RUMP_RUMP_SYSCALLS_H_ */ diff --git a/sys/rump/librump/rumpkern/rump_syscalls.c b/sys/rump/librump/rumpkern/rump_syscalls.c index 1301def076ce..e2acffe31263 100644 --- a/sys/rump/librump/rumpkern/rump_syscalls.c +++ b/sys/rump/librump/rumpkern/rump_syscalls.c @@ -1,14 +1,14 @@ -/* $NetBSD: rump_syscalls.c,v 1.60 2011/01/17 16:24:04 pooka Exp $ */ +/* $NetBSD: rump_syscalls.c,v 1.61 2011/01/17 18:25:17 pooka Exp $ */ /* * System call vector and marshalling for rump. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.241 2011/01/17 16:21:40 pooka Exp + * created from NetBSD: syscalls.master,v 1.242 2011/01/17 18:24:17 pooka Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: rump_syscalls.c,v 1.60 2011/01/17 16:24:04 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump_syscalls.c,v 1.61 2011/01/17 18:25:17 pooka Exp $"); #include #include @@ -224,6 +224,27 @@ rump___sysimpl_fchdir(int fd) } rsys_alias(sys_fchdir,rump_enosys) +int rump___sysimpl_mknod(const char *, mode_t, uint32_t); +int +rump___sysimpl_mknod(const char * path, mode_t mode, uint32_t dev) +{ + register_t rval[2] = {0, 0}; + int error = 0; + struct compat_50_sys_mknod_args callarg; + + SPARG(&callarg, path) = path; + SPARG(&callarg, mode) = mode; + SPARG(&callarg, dev) = dev; + + error = rsys_syscall(SYS_compat_50_mknod, &callarg, sizeof(callarg), rval); + if (error) { + rval[0] = -1; + rsys_seterrno(error); + } + return rval[0]; +} +rsys_alias(compat_50_sys_mknod,rump_enosys) + int rump___sysimpl_chmod(const char *, mode_t); int rump___sysimpl_chmod(const char * path, mode_t mode) @@ -2528,6 +2549,30 @@ rump___sysimpl_extattr_list_link(const char * path, int attrnamespace, void * da } rsys_alias(sys_extattr_list_link,rump_enosys) +int rump___sysimpl_pselect(int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *); +int +rump___sysimpl_pselect(int nd, fd_set * in, fd_set * ou, fd_set * ex, const struct timespec * ts, const sigset_t * mask) +{ + register_t rval[2] = {0, 0}; + int error = 0; + struct compat_50_sys_pselect_args callarg; + + SPARG(&callarg, nd) = nd; + SPARG(&callarg, in) = in; + SPARG(&callarg, ou) = ou; + SPARG(&callarg, ex) = ex; + SPARG(&callarg, ts) = (const struct timespec50 *)ts; + SPARG(&callarg, mask) = mask; + + error = rsys_syscall(SYS_compat_50_pselect, &callarg, sizeof(callarg), rval); + if (error) { + rval[0] = -1; + rsys_seterrno(error); + } + return rval[0]; +} +rsys_alias(compat_50_sys_pselect,rump_enosys) + int rump___sysimpl_pollts(struct pollfd *, u_int, const struct timespec *, const sigset_t *); int rump___sysimpl_pollts(struct pollfd * fds, u_int nfds, const struct timespec * ts, const sigset_t * mask) @@ -2974,6 +3019,27 @@ rump___sysimpl_fhstatvfs140(const void * fhp, size_t fh_size, struct statvfs * b } rsys_alias(sys___fhstatvfs140,rump_enosys) +int rump___sysimpl_fhstat40(const void *, size_t, struct stat *); +int +rump___sysimpl_fhstat40(const void * fhp, size_t fh_size, struct stat * sb) +{ + register_t rval[2] = {0, 0}; + int error = 0; + struct compat_50_sys___fhstat40_args callarg; + + SPARG(&callarg, fhp) = fhp; + SPARG(&callarg, fh_size) = fh_size; + SPARG(&callarg, sb) = (struct stat30 *)sb; + + error = rsys_syscall(SYS_compat_50___fhstat40, &callarg, sizeof(callarg), rval); + if (error) { + rval[0] = -1; + rsys_seterrno(error); + } + return rval[0]; +} +rsys_alias(compat_50_sys___fhstat40,rump_enosys) + int rump___sysimpl_mount50(const char *, const char *, int, void *, size_t); int rump___sysimpl_mount50(const char * type, const char * path, int flags, void * data, size_t data_len) @@ -3326,8 +3392,8 @@ struct sysent rump_sysent[] = { (sy_call_t *)sys_chdir }, /* 12 = chdir */ { ns(struct sys_fchdir_args), 0, (sy_call_t *)sys_fchdir }, /* 13 = fchdir */ - { 0, 0, 0, - (sy_call_t *)sys_nomodule }, /* 14 = mknod */ + { ns(struct compat_50_sys_mknod_args), 0, + (sy_call_t *)compat_50_sys_mknod }, /* 14 = compat_50_mknod */ { ns(struct sys_chmod_args), 0, (sy_call_t *)sys_chmod }, /* 15 = chmod */ { ns(struct sys_chown_args), 0, @@ -4112,8 +4178,8 @@ struct sysent rump_sysent[] = { (sy_call_t *)sys_extattr_list_file },/* 371 = extattr_list_file */ { ns(struct sys_extattr_list_link_args), 0, (sy_call_t *)sys_extattr_list_link },/* 372 = extattr_list_link */ - { 0, 0, 0, - (sy_call_t *)sys_nomodule }, /* 373 = pselect */ + { ns(struct compat_50_sys_pselect_args), 0, + (sy_call_t *)compat_50_sys_pselect },/* 373 = compat_50_pselect */ { ns(struct compat_50_sys_pollts_args), 0, (sy_call_t *)compat_50_sys_pollts },/* 374 = compat_50_pollts */ { ns(struct sys_setxattr_args), 0, @@ -4162,8 +4228,8 @@ struct sysent rump_sysent[] = { (sy_call_t *)sys___fhopen40 }, /* 396 = __fhopen40 */ { ns(struct sys___fhstatvfs140_args), 0, (sy_call_t *)sys___fhstatvfs140 }, /* 397 = __fhstatvfs140 */ - { 0, 0, 0, - (sy_call_t *)sys_nomodule }, /* 398 = __fhstat40 */ + { ns(struct compat_50_sys___fhstat40_args), 0, + (sy_call_t *)compat_50_sys___fhstat40 },/* 398 = compat_50___fhstat40 */ { 0, 0, 0, (sy_call_t *)sys_nomodule }, /* 399 = aio_cancel */ { 0, 0, 0,