diff options
Diffstat (limited to 'sys/kern/vfs_default.c')
-rw-r--r-- | sys/kern/vfs_default.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index b807db8..31a650c 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -78,6 +78,10 @@ static int dirent_exists(struct vnode *vp, const char *dirname, #define DIRENT_MINSIZE (sizeof(struct dirent) - (MAXNAMLEN+1) + 4) +static int vop_stdis_text(struct vop_is_text_args *ap); +static int vop_stdset_text(struct vop_set_text_args *ap); +static int vop_stdunset_text(struct vop_unset_text_args *ap); + /* * This vnode table stores what we want to do if the filesystem doesn't * implement a particular VOP. @@ -126,6 +130,9 @@ struct vop_vector default_vnodeops = { .vop_unp_bind = vop_stdunp_bind, .vop_unp_connect = vop_stdunp_connect, .vop_unp_detach = vop_stdunp_detach, + .vop_is_text = vop_stdis_text, + .vop_set_text = vop_stdset_text, + .vop_unset_text = vop_stdunset_text, }; /* @@ -1073,6 +1080,29 @@ vop_stdunp_detach(struct vop_unp_detach_args *ap) return (0); } +static int +vop_stdis_text(struct vop_is_text_args *ap) +{ + + return ((ap->a_vp->v_vflag & VV_TEXT) != 0); +} + +static int +vop_stdset_text(struct vop_set_text_args *ap) +{ + + ap->a_vp->v_vflag |= VV_TEXT; + return (0); +} + +static int +vop_stdunset_text(struct vop_unset_text_args *ap) +{ + + ap->a_vp->v_vflag &= ~VV_TEXT; + return (0); +} + /* * vfs default ops * used to fill the vfs function table to get reasonable default return values. |