1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2002-2003 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _MESSAGESTRINGS_H 28 #define _MESSAGESTRINGS_H 29 30 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 /* 37 * dgettext is normally defined by including libintl.h. However, the file 38 * /usr/sadm/lib/wbem/include/cimapi.h erroneously defines gettext so that 39 * they can play games with L10N in the CIM functions. If we try to undef 40 * gettext before we include libintl.h we get a complaint from hdrchk. So, 41 * just declare the extern here to work around this mess. 42 */ 43 extern char *dgettext(const char *, const char *); 44 45 /* cim failures */ 46 #define CREATE_PROPERTY_FAILURE \ 47 util_routineFailureMessage("cim_createProperty") 48 #define ADD_PROPERTY_FAILURE \ 49 util_routineFailureMessage("cim_addProperty") 50 #define ADD_INSTANCE_FAILURE \ 51 util_routineFailureMessage("cim_addInstance") 52 #define GET_INSTANCE_FAILURE \ 53 util_routineFailureMessage("cim_getInstance") 54 #define CREATE_INSTANCE_LIST_FAILURE \ 55 util_routineFailureMessage("cim_createInstanceList") 56 #define CREATE_INSTANCE_FAILURE \ 57 util_routineFailureMessage("cim_createInstance") 58 #define CREATE_OBJECT_LIST_FAILURE \ 59 util_routineFailureMessage("cim_createObjectPathList") 60 #define CREATE_OBJECT_PATH_FAILURE \ 61 util_routineFailureMessage("cim_createObjectPath") 62 #define ENUM_INSTANCES_FAILURE \ 63 util_routineFailureMessage("cim_enumerateInstances") 64 #define ENUM_INSTANCENAMES_FAILURE \ 65 util_routineFailureMessage("cim_enumerateInstanceNames") 66 #define COPY_OBJPATH_FAILURE \ 67 util_routineFailureMessage("cim_copyObjectPath") 68 #define CREATE_REFPROP_FAILURE \ 69 util_routineFailureMessage("cim_createReferenceProperty") 70 #define ASSOCIATOR_NAMES_FAILURE \ 71 util_routineFailureMessage("cim_associatorNames") 72 73 /* dm api failures */ 74 #define DM_GET_ATTR_FAILURE \ 75 util_routineFailureMessage("dm_get_attributes") 76 #define DM_GET_NAME_FAILURE \ 77 util_routineFailureMessage("dm_get_name") 78 #define DM_GET_ASSOC_FAILURE \ 79 util_routineFailureMessage("dm_get_associated_descriptors") 80 #define DM_GET_DESC_BYNAME_FAILURE \ 81 util_routineFailureMessage("dm_get_descriptor_by_name") 82 #define DM_GET_DESCRIPTORS \ 83 util_routineFailureMessage("dm_get_descriptors") 84 85 /* descriptor function failures */ 86 #define DRIVE_DESC_TO_INSTANCE_FAILURE \ 87 util_routineFailureMessage("drive_descriptor_toCCIMInstance") 88 #define PART_DESC_TO_INSTANCE_FAILURE \ 89 util_routineFailureMessage("partition_descriptor_toCCIMInstance") 90 #define DISK_DESC_TO_INSTANCE_FAILURE \ 91 util_routineFailureMessage("disk_descriptor_toCCIMInstance") 92 #define LOGICALDISK_DESC_TO_INSTANCE_FAILURE \ 93 util_routineFailureMessage("logicaldisk_descriptor_toCCIMInstance") 94 #define SCSICTRL_DESC_TO_INSTANCE_FAILURE \ 95 util_routineFailureMessage("scsictrl_descriptor_toCCIMInstance") 96 #define IDECTRL_DESC_TO_INSTANCE_FAILURE \ 97 util_routineFailureMessage("idectrl_descriptor_toCCIMInstance") 98 #define USBCTRL_DESC_TO_INSTANCE_FAILURE \ 99 util_routineFailureMessage("usbctrl_descriptor_toCCIMInstance") 100 #define FCCTRL_DESC_TO_INSTANCE_FAILURE \ 101 util_routineFailureMessage("fcctrl_descriptor_toCCIMInstance") 102 #define MPXIOCTRL_DESC_TO_INSTANCE_FAILURE \ 103 util_routineFailureMessage("mpxioctrl_descriptor_toCCIMInstance") 104 #define UCTRL_DESC_TO_INSTANCE_FAILURE \ 105 util_routineFailureMessage("unknownctrl_descriptor_toCCIMInstance") 106 #define MPXIOGRP_DESC_TO_INSTANCE_FAILURE \ 107 util_routineFailureMessage("mpxiogroup_descriptor_toCCIMInstance") 108 #define PARTBASEDON_DESC_TO_INSTANCE_FAILURE \ 109 util_routineFailureMessage("diskpartbo_descriptor_toCCIMInstance") 110 #define REALIZESEXT_DESC_TO_INSTANCE_FAILURE \ 111 util_routineFailureMessage("realizesextent_descriptor_toCCIMInstance") 112 #define REALIZESDD_DESC_TO_INSTANCE_FAILURE \ 113 util_routineFailureMessage( \ 114 "realizesdiskdrive_descriptor_toCCIMInstance") 115 #define MEDIAPRES_DESC_TO_INSTANCE_FAILURE \ 116 util_routineFailureMessage("mediapresent_descriptor_toCCIMInstance") 117 #define SCSIINT_ASSOC_TO_INSTANCE_FAILURE \ 118 util_routineFailureMessage("scsiIntAssocToInst") 119 #define FCINT_ASSOC_TO_INSTANCE_FAILURE \ 120 util_routineFailureMessage("fcIntAssocToInst") 121 #define USBINT_ASSOC_TO_INSTANCE_FAILURE \ 122 util_routineFailureMessage("usbIntAssocToInst") 123 #define MPXIOINT_ASSOC_TO_INSTANCE_FAILURE \ 124 util_routineFailureMessage("mpxioIntAssocToInst") 125 #define IDEINT_ASSOC_TO_INSTANCE_FAILURE \ 126 util_routineFailureMessage("ideIntAssocToInst") 127 #define MEDIAPRES_ASSOC_TO_INSTANCE_FAILURE \ 128 util_routineFailureMessage("MediaPresAssocToInst") 129 #define UTIL_FILEOPEN_FAILURE \ 130 util_routineFailureMessage("util_OpenFile") 131 #define UTIL_FILECLOSE_FAILURE \ 132 util_routineFailureMessage("util_CloseFile") 133 #define UTIL_FILEREMOVE_FAILURE \ 134 util_routineFailureMessage("util_RemoveFile") 135 136 /* General failures */ 137 #define LOW_MEMORY \ 138 dgettext(TEXT_DOMAIN, "Not enough memory Failure.") 139 #define GENERAL_FAILURE \ 140 dgettext(TEXT_DOMAIN, "General Failure.") 141 #define NO_SUCH_METHOD \ 142 dgettext(TEXT_DOMAIN, "No Such Method Defined.") 143 #define NVLIST_FAILURE \ 144 dgettext(TEXT_DOMAIN, "The nvlist action failed.") 145 #define NO_SUCH_CLASS \ 146 dgettext(TEXT_DOMAIN, "Class Not Found.") 147 148 #ifdef __cplusplus 149 } 150 #endif 151 152 #endif /* _MESSAGESTRINGS_H */ 153