summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2006-05-01 21:50:49 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2006-05-01 21:50:49 +0000
commit55b0463c75128802e6e6a0fb00d290fd6b4a22a3 (patch)
tree2ad4be5594353407f2be05c038491bfe7fc39d26 /sys/kern
parent50a6c9e7b9e92d2ec426061c3c0a401b497ad66d (diff)
Move vn_isunder() to vfs_vnops.c, that's the place for vn_* functions
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_getcwd.c16
-rw-r--r--sys/kern/vfs_vnops.c16
2 files changed, 16 insertions, 16 deletions
diff --git a/sys/kern/vfs_getcwd.c b/sys/kern/vfs_getcwd.c
index 3b7195788c3..fc93427560f 100644
--- a/sys/kern/vfs_getcwd.c
+++ b/sys/kern/vfs_getcwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_getcwd.c,v 1.7 2006/05/01 21:08:44 pedro Exp $ */
+/* $OpenBSD: vfs_getcwd.c,v 1.8 2006/05/01 21:50:48 pedro Exp $ */
/* $NetBSD: vfs_getcwd.c,v 1.3.2.3 1999/07/11 10:24:09 sommerfeld Exp $ */
/*
@@ -390,20 +390,6 @@ out:
return (error);
}
-/* Check if a directory can be found inside another in the hierarchy */
-int
-vn_isunder(struct vnode *lvp, struct vnode *rvp, struct proc *p)
-{
- int error;
-
- error = vfs_getcwd_common(lvp, rvp, NULL, NULL, MAXPATHLEN/2, 0, p);
-
- if (!error)
- return (1);
-
- return (0);
-}
-
/* True if p1's root directory is equal to or under p2's root directory */
int
proc_isunder(struct proc *p1, struct proc *p2)
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 1cf8d49979d..28d76563a0f 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_vnops.c,v 1.51 2006/04/23 17:36:09 pedro Exp $ */
+/* $OpenBSD: vfs_vnops.c,v 1.52 2006/05/01 21:50:48 pedro Exp $ */
/* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */
/*
@@ -506,3 +506,17 @@ vn_access(struct vnode *vp, int mode)
return (error);
}
+
+/* Check if a directory can be found inside another in the hierarchy */
+int
+vn_isunder(struct vnode *lvp, struct vnode *rvp, struct proc *p)
+{
+ int error;
+
+ error = vfs_getcwd_common(lvp, rvp, NULL, NULL, MAXPATHLEN/2, 0, p);
+
+ if (!error)
+ return (1);
+
+ return (0);
+}