/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
*/
#ifndef _SURI_STRINGS_H
#define _SURI_STRINGS_H
#include <libintl.h>
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(TEXT_DOMAIN)
#define TEXT_DOMAIN "SYS_TEST"
#endif
#define SURIGTEXT(x) dgettext(TEXT_DOMAIN, (x))
/*
* Common library [error] message strings
*/
#define ERR_SURI_NOMEM SURIGTEXT("Out of memory")
#define ERR_SURI_NAMETOOLONG SURIGTEXT("Name is too long")
#define ERR_SURI_PARSE_FAILED SURIGTEXT("Failed to parse URI")
#define ERR_SURI_MAP_FAILED SURIGTEXT("Failed to map URI")
#define ERR_SURI_LOOKUP_MAPPING_FAILED \
SURIGTEXT("Failed to lookup mapping for URI")
#define ERR_SURI_UNMAP_FAILED SURIGTEXT("Failed to unmap URI")
#define ERR_SURI_EMPTY_URI SURIGTEXT("Empty URI string")
#define ERR_SURI_CREATE_FAILED SURIGTEXT("Failed to create object for URI")
#define ERR_SURI_DESTROY_FAILED SURIGTEXT("Failed to destroy object for URI")
#define ERR_SURI_LOOKUP_URI_TXT1 "Failed to look up"
#define ERR_SURI_LOOKUP_URI_TXT2 "URI for device"
#define ERR_SURI_NO_S0_SLICE SURIGTEXT("Logical unit has no s0 slice")
/*
* We provide two almost identical versions of the "lookup URI failed" string so
* that we do not split it into two parts since that would make it more
* difficult to translate.
*/
#define ERR_SURI_LOOKUP_URI_FAILED \
SURIGTEXT(ERR_SURI_LOOKUP_URI_TXT1 " " ERR_SURI_LOOKUP_URI_TXT2)
#define ERR_SURI_LOOKUP_URI_FAILED_WITH_URI_TYPE \
SURIGTEXT(ERR_SURI_LOOKUP_URI_TXT1 " \"%s\" " ERR_SURI_LOOKUP_URI_TXT2)
#define ERR_SURI_CREATE_PROPS SURIGTEXT("Getting create object property")
#define ERR_SURI_SET_PROP SURIGTEXT("Failed to set property value")
#define ERR_SURI_SVC_ENABLE SURIGTEXT("Failed to enable service")
#define ERR_SURI_NOT_IN_SLASH_DEV \
SURIGTEXT("Absolute device path must start with " _PATH_DEV)
/*
* Strings representing the name of a suri object and its type.
*/
#define NAME_SURI_TYPE_ANY "URI type not set"
#define NAME_SURI_TYPE_INVALID "Invalid URI type"
#define NAME_SURI_TYPE_FILE "file"
#define NAME_SURI_TYPE_LU "lu"
#define NAME_SURI_TYPE_ISCSI "iscsi"
#define NAME_SURI_TYPE_DEV "dev"
#ifdef __cplusplus
}
#endif
#endif /* _SURI_STRINGS_H */