diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 0cd48ea4474..2cf62a51e10 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -134,7 +134,7 @@ struct vnode { seqc_t v_seqc; /* i modification count */ uint32_t v_nchash; /* u namecache hash */ u_int v_hash; - struct vop_vector *v_op; /* u vnode operations vector */ + const struct vop_vector *v_op; /* u vnode operations vector */ void *v_data; /* u private data for fs */ /* diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk index 0fff9a83175..b477bbc91c4 100644 --- a/sys/tools/vnode_if.awk +++ b/sys/tools/vnode_if.awk @@ -328,7 +328,7 @@ while ((getline < srcfile) > 0) { # Print out function prototypes. printh("int " uname "_AP(struct " name "_args *);"); - printh("int " uname "_APV(struct vop_vector *vop, struct " name "_args *);"); + printh("int " uname "_APV(const struct vop_vector *vop, struct " name "_args *);"); printh(""); printh("static __inline int " uname "("); for (i = 0; i < numargs; ++i) { @@ -392,7 +392,7 @@ while ((getline < srcfile) > 0) { printc(""); printc("\treturn(" uname "_APV(a->a_" args[0] "->v_op, a));"); printc("}"); - printc("\nint\n" uname "_APV(struct vop_vector *vop, struct " name "_args *a)"); + printc("\nint\n" uname "_APV(const struct vop_vector *vop, struct " name "_args *a)"); printc("{"); printc("\tint rc;"); printc("");