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