1185029Spjd/*-
2185029Spjd * Copyright (c) 2007 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3185029Spjd * All rights reserved.
4185029Spjd *
5185029Spjd * Redistribution and use in source and binary forms, with or without
6185029Spjd * modification, are permitted provided that the following conditions
7185029Spjd * are met:
8185029Spjd * 1. Redistributions of source code must retain the above copyright
9185029Spjd *    notice, this list of conditions and the following disclaimer.
10185029Spjd * 2. Redistributions in binary form must reproduce the above copyright
11185029Spjd *    notice, this list of conditions and the following disclaimer in the
12185029Spjd *    documentation and/or other materials provided with the distribution.
13185029Spjd *
14185029Spjd * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
15185029Spjd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16185029Spjd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17185029Spjd * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
18185029Spjd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19185029Spjd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20185029Spjd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21185029Spjd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22185029Spjd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23185029Spjd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24185029Spjd * SUCH DAMAGE.
25185029Spjd *
26185029Spjd * $FreeBSD$
27185029Spjd */
28185029Spjd
29185029Spjd#ifndef _OPENSOLARIS_SYS_PATHNAME_H_
30185029Spjd#define	_OPENSOLARIS_SYS_PATHNAME_H_
31185029Spjd
32185029Spjd#ifdef _KERNEL
33185029Spjd
34185029Spjd#include <sys/param.h>
35185029Spjd#include <sys/vnode.h>
36185029Spjd
37185029Spjdtypedef struct pathname {
38185029Spjd	char	*pn_buf;		/* underlying storage */
39185029Spjd	char	*pn_path;		/* remaining pathname */
40185029Spjd	size_t	pn_pathlen;		/* remaining length */
41185029Spjd	size_t	pn_bufsize;		/* total size of pn_buf */
42185029Spjd} pathname_t;
43185029Spjd
44185029Spjd#define	pn_alloc(pnp)	panic("pn_alloc() called")
45185029Spjd#define	pn_free(pnp)	panic("pn_free() called")
46185029Spjd
47185029Spjdint lookupname(char *, enum uio_seg, enum symfollow, vnode_t **, vnode_t **);
48185029Spjdint lookupnameat(char *, enum uio_seg, enum symfollow, vnode_t **, vnode_t **,
49185029Spjd    vnode_t *);
50185029Spjdint traverse(vnode_t **, int);
51185029Spjd
52185029Spjd#endif	/* _KERNEL */
53185029Spjd
54185029Spjd#endif	/* _OPENSOLARIS_SYS_PATHNAME_H_ */
55