Version mount(2) so that the length of the 'data' buffer is passed into
the kernel.
This commit is contained in:
parent
9326e3a3ef
commit
1490d3327f
@ -1,14 +1,14 @@
|
||||
/* $NetBSD: init_sysent.c,v 1.190 2007/04/30 14:47:32 rmind Exp $ */
|
||||
/* $NetBSD: init_sysent.c,v 1.191 2007/07/14 15:41:31 dsl Exp $ */
|
||||
|
||||
/*
|
||||
* System call switch table.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from NetBSD: syscalls.master,v 1.169 2007/04/30 14:44:30 rmind Exp
|
||||
* created from NetBSD: syscalls.master,v 1.170 2007/07/14 15:38:40 dsl Exp
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: init_sysent.c,v 1.190 2007/04/30 14:47:32 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: init_sysent.c,v 1.191 2007/07/14 15:41:31 dsl Exp $");
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
#include "opt_nfsserver.h"
|
||||
@ -91,6 +91,12 @@ __KERNEL_RCSID(0, "$NetBSD: init_sysent.c,v 1.190 2007/04/30 14:47:32 rmind Exp
|
||||
#define compat_30(func) sys_nosys
|
||||
#endif
|
||||
|
||||
#ifdef COMPAT_40
|
||||
#define compat_40(func) __CONCAT(compat_40_,func)
|
||||
#else
|
||||
#define compat_40(func) sys_nosys
|
||||
#endif
|
||||
|
||||
#define s(type) sizeof(type)
|
||||
|
||||
struct sysent sysent[] = {
|
||||
@ -141,8 +147,8 @@ struct sysent sysent[] = {
|
||||
{ 0, 0, SYCALL_MPSAFE | 0,
|
||||
sys_getpid }, /* 20 = getpid */
|
||||
#endif
|
||||
{ 4, s(struct sys_mount_args), 0,
|
||||
sys_mount }, /* 21 = mount */
|
||||
{ 4, s(struct compat_40_sys_mount_args), 0,
|
||||
compat_40(sys_mount) }, /* 21 = compat_40 mount */
|
||||
{ 2, s(struct sys_unmount_args), 0,
|
||||
sys_unmount }, /* 22 = unmount */
|
||||
{ 1, s(struct sys_setuid_args), 0,
|
||||
@ -1064,13 +1070,13 @@ struct sysent sysent[] = {
|
||||
{ 4, s(struct sys_lio_listio_args), 0,
|
||||
sys_lio_listio }, /* 406 = lio_listio */
|
||||
{ 0, 0, 0,
|
||||
sys_nosys }, /* 407 = filler */
|
||||
sys_nosys }, /* 407 = unimplemented */
|
||||
{ 0, 0, 0,
|
||||
sys_nosys }, /* 408 = filler */
|
||||
sys_nosys }, /* 408 = unimplemented */
|
||||
{ 0, 0, 0,
|
||||
sys_nosys }, /* 409 = filler */
|
||||
{ 0, 0, 0,
|
||||
sys_nosys }, /* 410 = filler */
|
||||
sys_nosys }, /* 409 = unimplemented */
|
||||
{ 5, s(struct sys___mount50_args), 0,
|
||||
sys___mount50 }, /* 410 = __mount50 */
|
||||
{ 0, 0, 0,
|
||||
sys_nosys }, /* 411 = filler */
|
||||
{ 0, 0, 0,
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* $NetBSD: syscalls.c,v 1.186 2007/04/30 14:47:32 rmind Exp $ */
|
||||
/* $NetBSD: syscalls.c,v 1.187 2007/07/14 15:41:31 dsl Exp $ */
|
||||
|
||||
/*
|
||||
* System call names.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from NetBSD: syscalls.master,v 1.169 2007/04/30 14:44:30 rmind Exp
|
||||
* created from NetBSD: syscalls.master,v 1.170 2007/07/14 15:38:40 dsl Exp
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.186 2007/04/30 14:47:32 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.187 2007/07/14 15:41:31 dsl Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_ktrace.h"
|
||||
@ -53,7 +53,7 @@ const char *const syscallnames[] = {
|
||||
#else
|
||||
"getpid", /* 20 = getpid */
|
||||
#endif
|
||||
"mount", /* 21 = mount */
|
||||
"compat_40_mount", /* 21 = compat_40 mount */
|
||||
"unmount", /* 22 = unmount */
|
||||
"setuid", /* 23 = setuid */
|
||||
#ifdef COMPAT_43
|
||||
@ -541,4 +541,8 @@ const char *const syscallnames[] = {
|
||||
"aio_suspend", /* 404 = aio_suspend */
|
||||
"aio_write", /* 405 = aio_write */
|
||||
"lio_listio", /* 406 = lio_listio */
|
||||
"#407 (unimplemented)", /* 407 = unimplemented */
|
||||
"#408 (unimplemented)", /* 408 = unimplemented */
|
||||
"#409 (unimplemented)", /* 409 = unimplemented */
|
||||
"__mount50", /* 410 = __mount50 */
|
||||
};
|
||||
|
@ -1,10 +1,10 @@
|
||||
# $NetBSD: syscalls.conf,v 1.10 2005/12/11 12:24:30 christos Exp $
|
||||
# $NetBSD: syscalls.conf,v 1.11 2007/07/14 15:41:31 dsl Exp $
|
||||
|
||||
sysnames="syscalls.c"
|
||||
sysnumhdr="../sys/syscall.h"
|
||||
syssw="init_sysent.c"
|
||||
sysarghdr="../sys/syscallargs.h"
|
||||
compatopts="compat_43 compat_09 compat_10 compat_11 compat_12 compat_13 compat_14 compat_15 compat_16 compat_20 compat_30"
|
||||
compatopts="compat_43 compat_09 compat_10 compat_11 compat_12 compat_13 compat_14 compat_15 compat_16 compat_20 compat_30 compat_40"
|
||||
libcompatopts=""
|
||||
|
||||
switchname="sysent"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vfs_syscalls.c,v 1.320 2007/07/12 19:35:37 dsl Exp $ */
|
||||
/* $NetBSD: vfs_syscalls.c,v 1.321 2007/07/14 15:41:31 dsl Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.320 2007/07/12 19:35:37 dsl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.321 2007/07/14 15:41:31 dsl Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
#include "opt_compat_43.h"
|
||||
@ -390,11 +390,12 @@ mount_getargs(struct lwp *l, struct vnode *vp, const char *path, int flags,
|
||||
return (error);
|
||||
}
|
||||
|
||||
#ifdef COMPAT_40
|
||||
/* ARGSUSED */
|
||||
int
|
||||
sys_mount(struct lwp *l, void *v, register_t *retval)
|
||||
compat_40_sys_mount(struct lwp *l, void *v, register_t *retval)
|
||||
{
|
||||
struct sys_mount_args /* {
|
||||
struct compat_40_sys_mount_args /* {
|
||||
syscallarg(const char *) type;
|
||||
syscallarg(const char *) path;
|
||||
syscallarg(int) flags;
|
||||
@ -405,6 +406,23 @@ sys_mount(struct lwp *l, void *v, register_t *retval)
|
||||
return do_sys_mount(l, NULL, SCARG(uap, type), SCARG(uap, path),
|
||||
SCARG(uap, flags), SCARG(uap, data), UIO_USERSPACE, 0, &dummy);
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
sys___mount50(struct lwp *l, void *v, register_t *retval)
|
||||
{
|
||||
struct sys___mount50_args /* {
|
||||
syscallarg(const char *) type;
|
||||
syscallarg(const char *) path;
|
||||
syscallarg(int) flags;
|
||||
syscallarg(void *) data;
|
||||
syscallarg(size_t) data_len;
|
||||
} */ *uap = v;
|
||||
|
||||
return do_sys_mount(l, NULL, SCARG(uap, type), SCARG(uap, path),
|
||||
SCARG(uap, flags), SCARG(uap, data), UIO_USERSPACE,
|
||||
SCARG(uap, data_len), retval);
|
||||
}
|
||||
|
||||
int
|
||||
do_sys_mount(struct lwp *l, struct vfsops *vfsops, const char *type,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mount.h,v 1.160 2007/07/12 19:35:37 dsl Exp $ */
|
||||
/* $NetBSD: mount.h,v 1.161 2007/07/14 15:41:30 dsl Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1991, 1993
|
||||
@ -364,10 +364,10 @@ int getfh(const char *, void *, size_t *)
|
||||
__RENAME(__getfh30);
|
||||
#endif
|
||||
|
||||
int mount(const char *, const char *, int, void *);
|
||||
int unmount(const char *, int);
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#ifndef __LIBC12_SOURCE__
|
||||
int mount(const char *, const char *, int, void *, size_t) __RENAME(__mount50);
|
||||
int fhopen(const void *, size_t, int) __RENAME(__fhopen40);
|
||||
int fhstat(const void *, size_t, struct stat *) __RENAME(__fhstat40);
|
||||
#endif
|
||||
|
@ -1,10 +1,10 @@
|
||||
/* $NetBSD: syscall.h,v 1.184 2007/04/30 14:47:32 rmind Exp $ */
|
||||
/* $NetBSD: syscall.h,v 1.185 2007/07/14 15:41:30 dsl Exp $ */
|
||||
|
||||
/*
|
||||
* System call numbers.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from NetBSD: syscalls.master,v 1.169 2007/04/30 14:44:30 rmind Exp
|
||||
* created from NetBSD: syscalls.master,v 1.170 2007/07/14 15:38:40 dsl Exp
|
||||
*/
|
||||
|
||||
#ifndef _SYS_SYSCALL_H_
|
||||
@ -77,8 +77,8 @@
|
||||
#define SYS_getpid 20
|
||||
|
||||
#endif
|
||||
/* syscall: "mount" ret: "int" args: "const char *" "const char *" "int" "void *" */
|
||||
#define SYS_mount 21
|
||||
/* syscall: "compat_40_mount" ret: "int" args: "const char *" "const char *" "int" "void *" */
|
||||
#define SYS_compat_40_mount 21
|
||||
|
||||
/* syscall: "unmount" ret: "int" args: "const char *" "int" */
|
||||
#define SYS_unmount 22
|
||||
@ -1144,6 +1144,9 @@
|
||||
/* syscall: "lio_listio" ret: "int" args: "int" "struct aiocb *const *" "int" "struct sigevent *" */
|
||||
#define SYS_lio_listio 406
|
||||
|
||||
#define SYS_MAXSYSCALL 407
|
||||
/* syscall: "__mount50" ret: "int" args: "const char *" "const char *" "int" "void *" "size_t" */
|
||||
#define SYS___mount50 410
|
||||
|
||||
#define SYS_MAXSYSCALL 411
|
||||
#define SYS_NSYSENT 512
|
||||
#endif /* _SYS_SYSCALL_H_ */
|
||||
|
@ -1,10 +1,10 @@
|
||||
/* $NetBSD: syscallargs.h,v 1.166 2007/04/30 14:47:33 rmind Exp $ */
|
||||
/* $NetBSD: syscallargs.h,v 1.167 2007/07/14 15:41:31 dsl Exp $ */
|
||||
|
||||
/*
|
||||
* System call argument lists.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from NetBSD: syscalls.master,v 1.169 2007/04/30 14:44:30 rmind Exp
|
||||
* created from NetBSD: syscalls.master,v 1.170 2007/07/14 15:38:40 dsl Exp
|
||||
*/
|
||||
|
||||
#ifndef _SYS_SYSCALLARGS_H_
|
||||
@ -118,7 +118,7 @@ struct compat_43_sys_lseek_args {
|
||||
#else
|
||||
#endif
|
||||
|
||||
struct sys_mount_args {
|
||||
struct compat_40_sys_mount_args {
|
||||
syscallarg(const char *) type;
|
||||
syscallarg(const char *) path;
|
||||
syscallarg(int) flags;
|
||||
@ -1779,6 +1779,14 @@ struct sys_lio_listio_args {
|
||||
syscallarg(struct sigevent *) sig;
|
||||
};
|
||||
|
||||
struct sys___mount50_args {
|
||||
syscallarg(const char *) type;
|
||||
syscallarg(const char *) path;
|
||||
syscallarg(int) flags;
|
||||
syscallarg(void *) data;
|
||||
syscallarg(size_t) data_len;
|
||||
};
|
||||
|
||||
/*
|
||||
* System call prototypes.
|
||||
*/
|
||||
@ -1826,7 +1834,7 @@ int sys_getpid_with_ppid(struct lwp *, void *, register_t *);
|
||||
int sys_getpid(struct lwp *, void *, register_t *);
|
||||
|
||||
#endif
|
||||
int sys_mount(struct lwp *, void *, register_t *);
|
||||
int compat_40_sys_mount(struct lwp *, void *, register_t *);
|
||||
|
||||
int sys_unmount(struct lwp *, void *, register_t *);
|
||||
|
||||
@ -2520,4 +2528,6 @@ int sys_aio_write(struct lwp *, void *, register_t *);
|
||||
|
||||
int sys_lio_listio(struct lwp *, void *, register_t *);
|
||||
|
||||
int sys___mount50(struct lwp *, void *, register_t *);
|
||||
|
||||
#endif /* _SYS_SYSCALLARGS_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user