zfs_namecheck.h revision b81d61a68b235e0529ebadc18e14d9d1dd52a258
943N/A/*
830N/A * CDDL HEADER START
830N/A *
919N/A * The contents of this file are subject to the terms of the
919N/A * Common Development and Distribution License, Version 1.0 only
919N/A * (the "License"). You may not use this file except in compliance
919N/A * with the License.
919N/A *
830N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
919N/A * or http://www.opensolaris.org/os/licensing.
919N/A * See the License for the specific language governing permissions
919N/A * and limitations under the License.
830N/A *
919N/A * When distributing Covered Code, include this CDDL HEADER in each
919N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
919N/A * If applicable, add the following below this CDDL HEADER, with the
919N/A * fields enclosed by brackets "[]" replaced with your own identifying
919N/A * information: Portions Copyright [yyyy] [name of copyright owner]
919N/A *
919N/A * CDDL HEADER END
830N/A */
830N/A/*
830N/A * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
830N/A * Use is subject to license terms.
830N/A */
830N/A
830N/A#ifndef _ZFS_NAMECHECK_H
830N/A#define _ZFS_NAMECHECK_H
830N/A
830N/A#pragma ident "%Z%%M% %I% %E% SMI"
830N/A
830N/A#ifdef __cplusplus
830N/Aextern "C" {
830N/A#endif
830N/A
830N/Atypedef enum {
830N/A NAME_ERR_LEADING_SLASH, /* name begins with leading slash */
830N/A NAME_ERR_EMPTY_COMPONENT, /* name contains an empty component */
830N/A NAME_ERR_TRAILING_SLASH, /* name ends with a slash */
830N/A NAME_ERR_INVALCHAR, /* invalid character found */
830N/A NAME_ERR_MULTIPLE_AT, /* multiple '@' characters found */
830N/A NAME_ERR_NOLETTER, /* pool doesn't begin with a letter */
830N/A NAME_ERR_RESERVED, /* entire name is reserved */
830N/A NAME_ERR_DISKLIKE, /* reserved disk name (c[0-9].*) */
830N/A NAME_ERR_TOOLONG, /* name is too long */
830N/A} namecheck_err_t;
830N/A
830N/Aint pool_namecheck(const char *, namecheck_err_t *, char *);
830N/Aint dataset_namecheck(const char *, namecheck_err_t *, char *);
830N/Aint dataset_name_hidden(const char *);
830N/A
830N/A#ifdef __cplusplus
830N/A}
830N/A#endif
830N/A
830N/A#endif /* _ZFS_NAMECHECK_H */
830N/A