b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * CDDL HEADER START
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * The contents of this file are subject to the terms of the
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * Common Development and Distribution License (the "License").
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * You may not use this file except in compliance with the License.
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * See the License for the specific language governing permissions
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * and limitations under the License.
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * When distributing Covered Code, include this CDDL HEADER in each
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * If applicable, add the following below this CDDL HEADER, with the
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * fields enclosed by brackets "[]" replaced with your own identifying
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * information: Portions Copyright [yyyy] [name of copyright owner]
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * CDDL HEADER END
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross/* All Rights Reserved */
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * support functions for reparse point
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * copied from uts/common/fs/fs_subr.c
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * reparse_vnode_parse
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * Read the symlink data of a reparse point specified by the vnode
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * and return the reparse data as name-value pair in the nvlist.
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross * Set up io vector to read sym link data
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross if ((err = VOP_READLINK(vp, &uio, zone_kcred(), NULL)) == 0) {
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross *(lkdata + MAXREPARSELEN - uio.uio_resid) = '\0';
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross kmem_free(lkdata, MAXREPARSELEN); /* done with lkdata */