#!/bin/sh -
copyright='
/*
- * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- *
- * The contents of this file constitute Original Code as defined in and
- * are subject to the Apple Public Source License Version 1.1 (the
- * "License"). You may not use this file except in compliance with the
- * License. Please obtain a copy of the License at
- * http://www.apple.com/publicsource and read it before using this file.
+ * Copyright (c) 2006 Apple Computer, Inc. All Rights Reserved.
*
- * This Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
+ * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
*
- * @APPLE_LICENSE_HEADER_END@
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the
+ * License may not be used to create, or enable the creation or
+ * redistribution of, unlawful or unlicensed copies of an Apple operating
+ * system, or to circumvent, violate, or enable the circumvention or
+ * violation of, any terms of an Apple operating system software license
+ * agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
*/
/*
* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
#define _SYS_VNODE_IF_H_
#include <sys/appleapiopts.h>
+#include <sys/ubc.h>
#ifdef __APPLE_API_UNSTABLE
extern struct vnodeop_desc vop_default_desc;
printf("static __inline int _%s(", toupper(name));
for (i=0; i<argc; i++) {
# generate ANSI protoypes now, hurrah!
- printf("%s %s", argtype[i], argname[i]);
+ printf("%s _%s", argtype[i], argname[i]);
if (i < (argc-1)) printf(", ");
}
printf(")\n");
printf("{\n\tstruct %s_args a;\n", name);
printf("\ta.a_desc = VDESC(%s);\n", name);
for (i=0; i<argc; i++) {
- printf("\ta.a_%s = %s;\n", argname[i], argname[i]);
+ printf("\ta.a_%s = _%s;\n", argname[i], argname[i]);
}
if (toupper(ubc) == "UBC") {
- printf("\t{\n\t\tint _err;\n\t\t" \
- "extern int ubc_hold(struct vnode *vp);\n\t\t" \
- "extern void ubc_rele(struct vnode *vp);\n\t\t" \
- "int _didhold = ubc_hold(%s);\n\t\t" \
- "_err = VCALL(%s%s, VOFFSET(%s), &a);\n\t\t" \
- "if (_didhold)\n\t\t\tubc_rele(%s);\n\t\t" \
+ printf("\t{\n\t\t" \
+ "int _err;\n\t\t" \
+ "_err = VCALL(_%s%s, VOFFSET(%s), &a);\n\t\t" \
"return (_err);\n\t}\n}\n",
argname[0], argname[0], arg0special, name, argname[0]);
} else {
- printf("\treturn (VCALL(%s%s, VOFFSET(%s), &a));\n}\n",
+ printf("\treturn (VCALL(_%s%s, VOFFSET(%s), &a));\n}\n",
argname[0], arg0special, name);
}
}
arg0special="->b_vp";
name="vop_strategy";
doit();
- name="vop_bwrite";
+ name="VNOP_BWRITE";
doit();
}
'"$awk_parser" | sed -e "$space_elim"
# vpp (if any)
do_offset("struct vnode **");
# cred (if any)
- do_offset("struct ucred *");
+ do_offset("kauth_credential_t");
# proc (if any)
do_offset("struct proc *");
# componentname
willrele[0]=0;
name="vop_strategy";
doit();
- name="vop_bwrite";
+ name="VNOP_BWRITE";
doit();
}
'"$awk_parser" | sed -e "$space_elim"
struct vnodeop_desc *vfs_op_descs[] = {
&vop_default_desc, /* MUST BE FIRST */
&vop_strategy_desc, /* XXX: SPECIAL CASE */
- &vop_bwrite_desc, /* XXX: SPECIAL CASE */
+ &VNOP_BWRITE_desc, /* XXX: SPECIAL CASE */
'
# Body stuff