diff options
-rw-r--r-- | sys/kern/vnode_if.sh | 44 | ||||
-rw-r--r-- | sys/sys/vnode.h | 43 |
2 files changed, 4 insertions, 83 deletions
diff --git a/sys/kern/vnode_if.sh b/sys/kern/vnode_if.sh index 026c47aa773..d79c55fbf3e 100644 --- a/sys/kern/vnode_if.sh +++ b/sys/kern/vnode_if.sh @@ -29,7 +29,7 @@ copyright="\ * SUCH DAMAGE. */ " -SCRIPT_ID='$OpenBSD: vnode_if.sh,v 1.15 2006/01/02 05:05:11 jsg Exp $' +SCRIPT_ID='$OpenBSD: vnode_if.sh,v 1.16 2007/12/12 16:24:49 thib Exp $' # SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.9 1996/02/29 20:58:22 cgd Exp $' # Script to produce VFS front-end sugar. @@ -239,40 +239,12 @@ struct vnodeop_desc vop_default_desc = { 0, "default", 0, - NULL, - VDESC_NO_OFFSET, - VDESC_NO_OFFSET, - VDESC_NO_OFFSET, - VDESC_NO_OFFSET, - NULL, }; ' # Body stuff sed -e "$sed_prep" $src | $awk ' -function do_offset(typematch) { - for (i=0; i<argc; i++) { - if (argtype[i] == typematch) { - printf("\tVOPARG_OFFSETOF(struct %s_args, a_%s),\n", - name, argname[i]); - return i; - }; - }; - print "\tVDESC_NO_OFFSET,"; - return -1; -} - function doit() { - # Define offsets array - printf("\nint %s_vp_offsets[] = {\n", name); - for (i=0; i<argc; i++) { - if (argtype[i] == "struct vnode *") { - printf ("\tVOPARG_OFFSETOF(struct %s_args,a_%s),\n", - name, argname[i]); - } - } - print "\tVDESC_NO_OFFSET"; - print "};"; # Define F_desc printf("struct vnodeop_desc %s_desc = {\n", name); # offset @@ -299,19 +271,7 @@ function doit() { vpnum++; } } - print ","; - # vp offsets - printf ("\t%s_vp_offsets,\n", name); - # vpp (if any) - do_offset("struct vnode **"); - # cred (if any) - do_offset("struct ucred *"); - # proc (if any) - do_offset("struct proc *"); - # componentname - do_offset("struct componentname *"); - # transport layer information - printf ("\tNULL,\n};\n"); + printf (",\n};\n"); # Define inline function. printf("\nint %s(", toupper(name)); diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 56a0e264fc5..ee482a7b84c 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vnode.h,v 1.88 2007/06/14 20:36:34 otto Exp $ */ +/* $OpenBSD: vnode.h,v 1.89 2007/12/12 16:24:49 thib Exp $ */ /* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */ /* @@ -270,36 +270,12 @@ extern int rushjob; /* # of slots syncer should run ASAP */ #define VDESC_VPP_WILLRELE 0x00020000 /* - * VDESC_NO_OFFSET is used to identify the end of the offset list - * and in places where no such field exists. - */ -#define VDESC_NO_OFFSET -1 - -/* * This structure describes the vnode operation taking place. */ struct vnodeop_desc { int vdesc_offset; /* offset in vector--first for speed */ - char *vdesc_name; /* a readable name for debugging */ + char *vdesc_name; /* a readable name for debugging */ int vdesc_flags; /* VDESC_* flags */ - - /* - * These ops are used by bypass routines to map and locate arguments. - * Creds and procs are not needed in bypass routines, but sometimes - * they are useful to (for example) transport layers. - * Nameidata is useful because it has a cred in it. - */ - int *vdesc_vp_offsets; /* list ended by VDESC_NO_OFFSET */ - int vdesc_vpp_offset; /* return vpp location */ - int vdesc_cred_offset; /* cred location, if any */ - int vdesc_proc_offset; /* proc location, if any */ - int vdesc_componentname_offset; /* if any */ - /* - * Finally, we've got a list of private data (about each operation) - * for each transport layer. (Support to manage this list is not - * yet part of BSD.) - */ - caddr_t *vdesc_transports; }; #ifdef _KERNEL @@ -310,21 +286,6 @@ extern struct vnodeop_desc *vnodeop_descs[]; /* - * This macro is very helpful in defining those offsets in the vdesc struct. - * - * This is stolen from X11R4. I ingored all the fancy stuff for - * Crays, so if you decide to port this to such a serious machine, - * you might want to consult Intrisics.h's XtOffset{,Of,To}. - */ -#define VOPARG_OFFSET(p_type,field) \ - ((int) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL))) -#define VOPARG_OFFSETOF(s_type,field) \ - VOPARG_OFFSET(s_type*,field) -#define VOPARG_OFFSETTO(S_TYPE,S_OFFSET,STRUCT_P) \ - ((S_TYPE)(((char *)(STRUCT_P))+(S_OFFSET))) - - -/* * This structure is used to configure the new vnodeops vector. */ struct vnodeopv_entry_desc { |