]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/vm/vnode_pager.c
xnu-792.22.5.tar.gz
[apple/xnu.git] / bsd / vm / vnode_pager.c
index f6969d1bc3bbad939fe6175325666d28d039de65..552c0afb0bf733fb2d758c5d17d8d1a98b0cfd05 100644 (file)
@@ -88,6 +88,32 @@ vnode_pager_get_filesize(struct vnode *vp)
        return (vm_object_offset_t) ubc_getsize(vp);
 }
 
+kern_return_t
+vnode_pager_get_pathname(
+       struct vnode    *vp,
+       char            *pathname,
+       vm_size_t       *length_p)
+{
+       int     error, len;
+
+       len = (int) *length_p;
+       error = vn_getpath(vp, pathname, &len);
+       if (error != 0) {
+               return KERN_FAILURE;
+       }
+       *length_p = (vm_size_t) len;
+       return KERN_SUCCESS;
+}
+
+kern_return_t
+vnode_pager_get_filename(
+       struct vnode    *vp,
+       char            **filename)
+{
+       *filename = vp->v_name;
+       return KERN_SUCCESS;
+}
+
 pager_return_t
 vnode_pageout(struct vnode *vp,
        upl_t                   upl,