1fcf3ce44SJohn Forte /*
2fcf3ce44SJohn Forte  * CDDL HEADER START
3fcf3ce44SJohn Forte  *
4fcf3ce44SJohn Forte  * The contents of this file are subject to the terms of the
5fcf3ce44SJohn Forte  * Common Development and Distribution License (the "License").
6fcf3ce44SJohn Forte  * You may not use this file except in compliance with the License.
7fcf3ce44SJohn Forte  *
8fcf3ce44SJohn Forte  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9fcf3ce44SJohn Forte  * or http://www.opensolaris.org/os/licensing.
10fcf3ce44SJohn Forte  * See the License for the specific language governing permissions
11fcf3ce44SJohn Forte  * and limitations under the License.
12fcf3ce44SJohn Forte  *
13fcf3ce44SJohn Forte  * When distributing Covered Code, include this CDDL HEADER in each
14fcf3ce44SJohn Forte  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15fcf3ce44SJohn Forte  * If applicable, add the following below this CDDL HEADER, with the
16fcf3ce44SJohn Forte  * fields enclosed by brackets "[]" replaced with your own identifying
17fcf3ce44SJohn Forte  * information: Portions Copyright [yyyy] [name of copyright owner]
18fcf3ce44SJohn Forte  *
19fcf3ce44SJohn Forte  * CDDL HEADER END
20fcf3ce44SJohn Forte  */
21fcf3ce44SJohn Forte /*
22fcf3ce44SJohn Forte  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23fcf3ce44SJohn Forte  * Use is subject to license terms.
24fcf3ce44SJohn Forte  */
25fcf3ce44SJohn Forte 
26fcf3ce44SJohn Forte /*
27fcf3ce44SJohn Forte  * mpathadm_text.c : MP API CLI program
28fcf3ce44SJohn Forte  *
29fcf3ce44SJohn Forte  */
30fcf3ce44SJohn Forte 
31fcf3ce44SJohn Forte #include <libintl.h>
32fcf3ce44SJohn Forte 
33fcf3ce44SJohn Forte #include <mpapi.h>
34fcf3ce44SJohn Forte #include "mpathadm_text.h"
35fcf3ce44SJohn Forte 
36fcf3ce44SJohn Forte 
getTextString(int stringVal)37fcf3ce44SJohn Forte MP_CHAR * getTextString(int stringVal) {
38fcf3ce44SJohn Forte 	switch (stringVal) {
39fcf3ce44SJohn Forte 		case TEXT_UNKNOWN:
40fcf3ce44SJohn Forte 			return (gettext("unknown"));
41fcf3ce44SJohn Forte 
42fcf3ce44SJohn Forte 		/* load balance types for display and input to cli */
43fcf3ce44SJohn Forte 		case TEXT_LBTYPE_FAILOVER_ONLY:
44fcf3ce44SJohn Forte 			return ("failover-only");
45fcf3ce44SJohn Forte 		case TEXT_LBTYPE_LBAREGION:
46fcf3ce44SJohn Forte 			return ("logical-block");
47fcf3ce44SJohn Forte 		case TEXT_LBTYPE_DEVICEPROD:
48fcf3ce44SJohn Forte 			return ("device-product-specific");
49fcf3ce44SJohn Forte 		case TEXT_LBTYPE_LEASTIO:
50fcf3ce44SJohn Forte 			return ("least-used");
51fcf3ce44SJohn Forte 		case TEXT_LBTYPE_LEASTBLOCKS:
52fcf3ce44SJohn Forte 			return ("least-blocks");
53fcf3ce44SJohn Forte 		case TEXT_LBTYPE_ROUNDROBIN:
54fcf3ce44SJohn Forte 			return ("round-robin");
55fcf3ce44SJohn Forte 		case TEXT_LBTYPE_UNKNOWN:
56fcf3ce44SJohn Forte 			return ("unknown");
57fcf3ce44SJohn Forte 		case TEXT_LBTYPE_NONE:
58fcf3ce44SJohn Forte 			return ("none");
59fcf3ce44SJohn Forte 		case TEXT_LBTYPE_PROPRIETARY1:
60fcf3ce44SJohn Forte 			return ("proprietary1");
61fcf3ce44SJohn Forte 		case TEXT_LBTYPE_PROPRIETARY2:
62fcf3ce44SJohn Forte 			return ("proprietary2");
63fcf3ce44SJohn Forte 		case TEXT_LBTYPE_PROPRIETARY3:
64fcf3ce44SJohn Forte 			return ("proprietary3");
65fcf3ce44SJohn Forte 		case TEXT_LBTYPE_PROPRIETARY4:
66fcf3ce44SJohn Forte 			return ("proprietary4");
67fcf3ce44SJohn Forte 		case TEXT_LBTYPE_PROPRIETARY5:
68fcf3ce44SJohn Forte 			return ("proprietary5");
69fcf3ce44SJohn Forte 		case TEXT_LBTYPE_PROPRIETARY6:
70fcf3ce44SJohn Forte 			return ("proprietary6");
71fcf3ce44SJohn Forte 		case TEXT_LBTYPE_PROPRIETARY7:
72fcf3ce44SJohn Forte 			return ("proprietary7");
73fcf3ce44SJohn Forte 		case TEXT_LBTYPE_PROPRIETARY8:
74fcf3ce44SJohn Forte 			return ("proprietary8");
75fcf3ce44SJohn Forte 		case TEXT_LBTYPE_PROPRIETARY9:
76fcf3ce44SJohn Forte 			return ("proprietary9");
77fcf3ce44SJohn Forte 		case TEXT_LBTYPE_PROPRIETARY10:
78fcf3ce44SJohn Forte 			return ("proprietary10");
79fcf3ce44SJohn Forte 		case TEXT_LBTYPE_PROPRIETARY11:
80fcf3ce44SJohn Forte 			return ("proprietary11");
81fcf3ce44SJohn Forte 		case TEXT_LBTYPE_PROPRIETARY12:
82fcf3ce44SJohn Forte 			return ("proprietary12");
83fcf3ce44SJohn Forte 		case TEXT_LBTYPE_PROPRIETARY13:
84fcf3ce44SJohn Forte 			return ("proprietary13");
85fcf3ce44SJohn Forte 		case TEXT_LBTYPE_PROPRIETARY14:
86fcf3ce44SJohn Forte 			return ("proprietary14");
87fcf3ce44SJohn Forte 		case TEXT_LBTYPE_PROPRIETARY15:
88fcf3ce44SJohn Forte 			return ("proprietary15");
89fcf3ce44SJohn Forte 		case TEXT_LBTYPE_PROPRIETARY16:
90fcf3ce44SJohn Forte 			return ("proprietary16");
91fcf3ce44SJohn Forte 
92fcf3ce44SJohn Forte 		/* used for display */
93fcf3ce44SJohn Forte 		case TEXT_NA:
94fcf3ce44SJohn Forte 			return (gettext("NA"));
95fcf3ce44SJohn Forte 
96fcf3ce44SJohn Forte 		/* used for displaying of state and comparing input into cli */
97fcf3ce44SJohn Forte 		case TEXT_YES:
98fcf3ce44SJohn Forte 			return (gettext("yes"));
99fcf3ce44SJohn Forte 		case TEXT_NO:
100fcf3ce44SJohn Forte 			return (gettext("no"));
101fcf3ce44SJohn Forte 		case TEXT_ON:
102fcf3ce44SJohn Forte 			return ("on");
103fcf3ce44SJohn Forte 		case TEXT_OFF:
104fcf3ce44SJohn Forte 			return ("off");
105fcf3ce44SJohn Forte 
106fcf3ce44SJohn Forte 		/* labels for display */
107fcf3ce44SJohn Forte 		case TEXT_LB_VENDOR:
108fcf3ce44SJohn Forte 			return ("Vendor:");
109fcf3ce44SJohn Forte 		case TEXT_LB_DRIVER_NAME:
110fcf3ce44SJohn Forte 			return ("Driver Name:");
111fcf3ce44SJohn Forte 		case TEXT_LB_DEFAULT_LB:
112fcf3ce44SJohn Forte 			return ("Default Load Balance:");
113fcf3ce44SJohn Forte 		case TEXT_LB_SUPPORTED_LB:
114fcf3ce44SJohn Forte 			return ("Supported Load Balance Types:");
115fcf3ce44SJohn Forte 		case TEXT_LB_ALLOWS_ACT_TPG:
116fcf3ce44SJohn Forte 			return ("Allows To Activate Target Port Group Access:");
117fcf3ce44SJohn Forte 		case TEXT_LB_ALLOWS_PATH_OV:
118fcf3ce44SJohn Forte 			return ("Allows Path Override:");
119fcf3ce44SJohn Forte 		case TEXT_LB_SUPP_AUTO_FB:
120fcf3ce44SJohn Forte 			return ("Supported Auto Failback Config:");
121fcf3ce44SJohn Forte 		case TEXT_LB_AUTO_FB:
122fcf3ce44SJohn Forte 			return ("Auto Failback:");
123fcf3ce44SJohn Forte 		case TEXT_LB_FB_POLLING_RATE:
124fcf3ce44SJohn Forte 			return ("Failback Polling Rate (current/max):");
125fcf3ce44SJohn Forte 		case TEXT_LB_SUPP_AUTO_P:
126fcf3ce44SJohn Forte 			return ("Supported Auto Probing Config:");
127fcf3ce44SJohn Forte 		case TEXT_LB_AUTO_PROB:
128fcf3ce44SJohn Forte 			return ("Auto Probing:");
129fcf3ce44SJohn Forte 		case TEXT_LB_PR_POLLING_RATE:
130fcf3ce44SJohn Forte 			return ("Probing Polling Rate (current/max):");
131fcf3ce44SJohn Forte 		case TEXT_LB_SUPP_DEVICES:
132fcf3ce44SJohn Forte 			return ("Supported Devices:");
133fcf3ce44SJohn Forte 		case TEXT_LB_PRODUCT:
134fcf3ce44SJohn Forte 			return ("Product:");
135fcf3ce44SJohn Forte 		case TEXT_LB_REVISION:
136fcf3ce44SJohn Forte 			return ("Revision:");
137fcf3ce44SJohn Forte 		case TEXT_LB_LOGICAL_UNIT:
138fcf3ce44SJohn Forte 			return ("Logical Unit:");
139fcf3ce44SJohn Forte 		case TEXT_LB_INQUIRY_NAME_TYPE:
140fcf3ce44SJohn Forte 			return ("Name Type:");
141fcf3ce44SJohn Forte 		case TEXT_NAME_TYPE_UNKNOWN:
142fcf3ce44SJohn Forte 			return ("unknown type");
143fcf3ce44SJohn Forte 		case TEXT_NAME_TYPE_VPD83_TYPE1:
144fcf3ce44SJohn Forte 			return ("SCSI Inquiry VPD Page83 Type1");
145fcf3ce44SJohn Forte 		case TEXT_NAME_TYPE_VPD83_TYPE2:
146fcf3ce44SJohn Forte 			return ("SCSI Inquiry VPD Page83 Type2");
147fcf3ce44SJohn Forte 		case TEXT_NAME_TYPE_VPD83_TYPE3:
148fcf3ce44SJohn Forte 			return ("SCSI Inquiry VPD Page83 Type3");
149fcf3ce44SJohn Forte 		case TEXT_NAME_TYPE_DEVICE_SPECIFIC:
150fcf3ce44SJohn Forte 			return ("device specific type");
151fcf3ce44SJohn Forte 		case TEXT_LB_INQUIRY_NAME:
152fcf3ce44SJohn Forte 			return ("Name:");
153fcf3ce44SJohn Forte 		case TEXT_LB_ASYMMETRIC:
154fcf3ce44SJohn Forte 			return ("Asymmetric:");
155fcf3ce44SJohn Forte 		case TEXT_LB_EXPLICIT_FAILOVER:
156fcf3ce44SJohn Forte 			return ("Explicit Failover:");
157fcf3ce44SJohn Forte 		case TEXT_LB_CURR_LOAD_BALANCE:
158fcf3ce44SJohn Forte 			return ("Current Load Balance:");
159fcf3ce44SJohn Forte 		case TEXT_LB_LU_GROUP_ID:
160fcf3ce44SJohn Forte 			return ("Logical Unit Group ID:");
161fcf3ce44SJohn Forte 		case TEXT_LB_PATH_INFO:
162fcf3ce44SJohn Forte 			return ("Paths:");
163fcf3ce44SJohn Forte 		case TEXT_LB_INIT_PORT_NAME:
164fcf3ce44SJohn Forte 			return ("Initiator Port Name:");
165fcf3ce44SJohn Forte 		case TEXT_LB_TARGET_PORT_NAME:
166fcf3ce44SJohn Forte 			return ("Target Port Name:");
167fcf3ce44SJohn Forte 		case TEXT_LB_OVERRIDE_PATH:
168fcf3ce44SJohn Forte 			return ("Override Path:");
169fcf3ce44SJohn Forte 		case TEXT_LB_PATH_STATE:
170fcf3ce44SJohn Forte 			return ("Path State:");
171fcf3ce44SJohn Forte 		case TEXT_LB_TPG_INFO:
172fcf3ce44SJohn Forte 			return ("Target Port Groups:");
173fcf3ce44SJohn Forte 		case TEXT_LB_ACCESS_STATE:
174fcf3ce44SJohn Forte 			return ("Access State:");
175fcf3ce44SJohn Forte 		case TEXT_LB_ID:
176fcf3ce44SJohn Forte 			return ("ID:");
177fcf3ce44SJohn Forte 		case TEXT_TPORT_LIST:
178fcf3ce44SJohn Forte 			return ("Target Ports:");
179fcf3ce44SJohn Forte 		case TEXT_LB_NAME:
180fcf3ce44SJohn Forte 			return ("Name:");
181fcf3ce44SJohn Forte 		case TEXT_LB_RELATIVE_ID:
182fcf3ce44SJohn Forte 			return ("Relative ID:");
183fcf3ce44SJohn Forte 		case TEXT_LB_INITATOR_PORT:
184fcf3ce44SJohn Forte 			return ("Initiator Port:");
185fcf3ce44SJohn Forte 		case TEXT_LB_TRANSPORT_TYPE:
186fcf3ce44SJohn Forte 			return ("Transport Type:");
187fcf3ce44SJohn Forte 		case TEXT_LB_OS_DEVICE_FILE:
188fcf3ce44SJohn Forte 			return ("OS Device File:");
189fcf3ce44SJohn Forte 		case TEXT_LB_MPATH_SUPPORT:
190fcf3ce44SJohn Forte 			return ("mpath-support:");
191fcf3ce44SJohn Forte 		case TEXT_LB_PATH_COUNT:
192fcf3ce44SJohn Forte 			return ("Total Path Count:");
193fcf3ce44SJohn Forte 		case TEXT_LB_OP_PATH_COUNT:
194fcf3ce44SJohn Forte 			return ("Operational Path Count:");
195fcf3ce44SJohn Forte 
196fcf3ce44SJohn Forte 		case TEXT_LB_ENABLED:
197fcf3ce44SJohn Forte 			return ("Enabled:");
198fcf3ce44SJohn Forte 		case TEXT_LB_DISABLED:
199fcf3ce44SJohn Forte 			return ("Disabled:");
200fcf3ce44SJohn Forte 
201fcf3ce44SJohn Forte 		case TEXT_UNKNOWN_OBJECT:
202fcf3ce44SJohn Forte 			return (gettext("unknown object"));
203fcf3ce44SJohn Forte 
204fcf3ce44SJohn Forte 		/* status strings used in error messages */
205fcf3ce44SJohn Forte 		case TEXT_MPSTATUS_SUCCESS:
206fcf3ce44SJohn Forte 			return (gettext("success"));
207fcf3ce44SJohn Forte 		case TEXT_MPSTATUS_INV_PARAMETER:
208fcf3ce44SJohn Forte 			return (gettext("invalid parameter"));
209fcf3ce44SJohn Forte 		case TEXT_MPSTATUS_UNKNOWN_FN:
210fcf3ce44SJohn Forte 			return (gettext("unknown client function"));
211fcf3ce44SJohn Forte 		case TEXT_MPSTATUS_FAILED:
212fcf3ce44SJohn Forte 			return (gettext("failed"));
213fcf3ce44SJohn Forte 		case TEXT_MPSTATUS_INSUFF_MEMORY:
214fcf3ce44SJohn Forte 			return (gettext("insufficient memory"));
215fcf3ce44SJohn Forte 		case TEXT_MPSTATUS_INV_OBJ_TYPE:
216fcf3ce44SJohn Forte 			return (gettext("invalid object type"));
217fcf3ce44SJohn Forte 		case TEXT_MPSTATUS_OBJ_NOT_FOUND:
218fcf3ce44SJohn Forte 			return (gettext("object not found"));
219fcf3ce44SJohn Forte 		case TEXT_MPSTATUS_UNSUPPORTED:
220fcf3ce44SJohn Forte 			return (gettext("unsupported"));
221fcf3ce44SJohn Forte 		case TEXT_MPSTATUS_FN_REPLACED:
222fcf3ce44SJohn Forte 			return (gettext("function replaced"));
223fcf3ce44SJohn Forte 		case TEXT_MPSTATUS_ACC_STATE_INVAL:
224fcf3ce44SJohn Forte 			return (gettext("invalid access state"));
225fcf3ce44SJohn Forte 		case TEXT_MPSTATUS_PATH_NONOP:
226fcf3ce44SJohn Forte 			return (gettext("path not operational"));
227fcf3ce44SJohn Forte 		case TEXT_MPSTATUS_TRY_AGAIN:
228fcf3ce44SJohn Forte 			return (gettext("try again"));
229fcf3ce44SJohn Forte 		case TEXT_MPSTATUS_NOT_PERMITTED:
230fcf3ce44SJohn Forte 			return (gettext("not permitted"));
231fcf3ce44SJohn Forte 
232fcf3ce44SJohn Forte 		/* error messages */
233fcf3ce44SJohn Forte 		case ERR_NO_MPATH_SUPPORT_LIST:
234fcf3ce44SJohn Forte 			return (gettext("Error: Unable to get mpath-support "
235fcf3ce44SJohn Forte 			    "list."));
236fcf3ce44SJohn Forte 		case ERR_CANT_FIND_MPATH_SUPPORT_WITH_NAME:
237fcf3ce44SJohn Forte 			return (gettext("Error: Unable to find mpath-support "
238fcf3ce44SJohn Forte 			    "%s."));
239fcf3ce44SJohn Forte 		case ERR_NO_PROPERTIES:
240fcf3ce44SJohn Forte 			return (gettext("Error: Unable to get configuration "
241fcf3ce44SJohn Forte 			    "information."));
242fcf3ce44SJohn Forte 		case ERR_NO_SUPP_DEVICE_INFO:
243fcf3ce44SJohn Forte 			return (gettext("Error: Unable to get supported "
244fcf3ce44SJohn Forte 			    "device product information."));
245fcf3ce44SJohn Forte 		case ERR_NO_LU_LIST:
246fcf3ce44SJohn Forte 			return (gettext("Error: Unable to get the logical "
247fcf3ce44SJohn Forte 			    "unit list."));
248fcf3ce44SJohn Forte 		case ERR_NO_ASSOCIATED_LU:
249fcf3ce44SJohn Forte 			return (gettext("Error: Unable to find an "
250fcf3ce44SJohn Forte 			    "associated logical-unit."));
251fcf3ce44SJohn Forte 		case ERR_LU_NOT_FOUND_WITH_MISSING_LU_STR:
252fcf3ce44SJohn Forte 			return (gettext("Error: Logical-unit %s is not "
253fcf3ce44SJohn Forte 			    "found."));
254fcf3ce44SJohn Forte 		case ERR_NO_LU_PATH_INFO_WITH_MISSING_LU_STR:
255fcf3ce44SJohn Forte 			return (gettext("Error: Failed to get path info for "
256fcf3ce44SJohn Forte 			    "logical-unit %s."));
257fcf3ce44SJohn Forte 		case ERR_NO_ASSOC_TPGS:
258fcf3ce44SJohn Forte 			return (gettext("Error: Unable to get associated "
259fcf3ce44SJohn Forte 			    "target port groups ."));
260fcf3ce44SJohn Forte 		case ERR_NO_ASSOC_TPORTS:
261fcf3ce44SJohn Forte 			return (gettext("Error: Unable to get associated "
262fcf3ce44SJohn Forte 			    "target ports."));
263fcf3ce44SJohn Forte 		case ERR_NO_INIT_PORTS:
264fcf3ce44SJohn Forte 			return (gettext("Error: Unable to get the "
265fcf3ce44SJohn Forte 			    "initiator-port list."));
266fcf3ce44SJohn Forte 		case ERR_NO_INIT_PORT_LIST_WITH_REASON:
267fcf3ce44SJohn Forte 			return (gettext("Error: Unable to get the "
268fcf3ce44SJohn Forte 			    "initiator-port list: %s."));
269fcf3ce44SJohn Forte 		case ERR_INIT_PORT_NOT_FOUND_WITH_MISSING_LU_STR:
270fcf3ce44SJohn Forte 			return (gettext("Error: Initiator port %s is not "
271fcf3ce44SJohn Forte 			    "found."));
272fcf3ce44SJohn Forte 		case ERR_FAILED_TO_REGISTER_PLUGIN_NAME_WITH_REASON:
273fcf3ce44SJohn Forte 			return (gettext("Error: Failed to register %s: %s."));
274fcf3ce44SJohn Forte 		case ERR_FAILED_TO_DEREGISTER_PLUGIN_NAME_WITH_REASON:
275fcf3ce44SJohn Forte 			return (gettext("Error: Failed to deregister "
276fcf3ce44SJohn Forte 			    "%ls: %s."));
277fcf3ce44SJohn Forte 		case ERR_FAILED_TO_CHANGE_OPTION_WITH_REASON:
278fcf3ce44SJohn Forte 			return (gettext("Error: Failed to change %s: %s."));
279fcf3ce44SJohn Forte 		case ERR_FAILED_TO_ENABLE_PATH_WITH_REASON:
280fcf3ce44SJohn Forte 			return (gettext("Error: Failed to enable path: %s."));
281fcf3ce44SJohn Forte 		case ERR_FAILED_TO_DISABLE_PATH_WITH_REASON:
282fcf3ce44SJohn Forte 			return (gettext("Error: Failed to disable path: %s."));
283fcf3ce44SJohn Forte 		case ERR_FAILED_TO_OVERRIDE_PATH_WITH_REASON:
284fcf3ce44SJohn Forte 			return (gettext("Error: Failed to override path: "
285fcf3ce44SJohn Forte 			    "%s."));
286fcf3ce44SJohn Forte 		case ERR_LU_NOT_ASYMMETRIC:
287fcf3ce44SJohn Forte 			return (gettext("Error: The logical unit is not "
288fcf3ce44SJohn Forte 			    "asymmetric."));
289fcf3ce44SJohn Forte 		case ERR_NO_FAILOVER_ALLOWED:
290fcf3ce44SJohn Forte 			return (gettext("Error: The logical unit doesn't "
291fcf3ce44SJohn Forte 			    "support explicit state change."));
292fcf3ce44SJohn Forte 		case ERR_FAILED_TO_FAILOVER_WITH_LU_AND_REASON:
293fcf3ce44SJohn Forte 			return (gettext("Error: Failover failed %s: %s."));
294fcf3ce44SJohn Forte 		case ERR_FAILED_TO_FAILOVER_WITH_REASON:
295fcf3ce44SJohn Forte 			return (gettext("Error: Failover failed: %s."));
296fcf3ce44SJohn Forte 		case ERR_FAILED_TO_CANCEL_OVERRIDE_PATH_WITH_REASON:
297fcf3ce44SJohn Forte 			return (gettext("Error: Failed to cancel the "
298fcf3ce44SJohn Forte 			    "overriding setting:  %s."));
299fcf3ce44SJohn Forte 		case ERR_FAILED_TO_FIND_PATH:
300fcf3ce44SJohn Forte 			return (gettext("Error: Unable to find path."));
301fcf3ce44SJohn Forte 		case LU_NOT_FOUND:
302fcf3ce44SJohn Forte 			return (gettext("logical-unit not found"));
303fcf3ce44SJohn Forte 		case FAILED_TO_FIND_PATH:
304fcf3ce44SJohn Forte 			return (gettext("Unable to find path"));
305fcf3ce44SJohn Forte 		case MISSING_LU_NAME:
306fcf3ce44SJohn Forte 			return (gettext("Missing logical-unit name"));
307fcf3ce44SJohn Forte 		case MISSING_INIT_PORT_NAME:
308fcf3ce44SJohn Forte 			return (gettext("Missing initiator-port name"));
309fcf3ce44SJohn Forte 		case MISSING_TARGET_PORT_NAME:
310fcf3ce44SJohn Forte 			return (gettext("Missing target-port name"));
311fcf3ce44SJohn Forte 		case TEXT_AUTO_FAILBACK:
312fcf3ce44SJohn Forte 			return (gettext("auto failback"));
313fcf3ce44SJohn Forte 		case TEXT_AUTO_PROBING:
314fcf3ce44SJohn Forte 			return (gettext("auto probing"));
315fcf3ce44SJohn Forte 		case TEXT_LOAD_BALANCE:
316fcf3ce44SJohn Forte 			return (gettext("load balance"));
317fcf3ce44SJohn Forte 		case TEXT_ILLEGAL_ARGUMENT:
318fcf3ce44SJohn Forte 			return (gettext("illegal argument"));
319fcf3ce44SJohn Forte 		case TEXT_MPATH_SUPPORT_NOT_FOUND:
320fcf3ce44SJohn Forte 			return (gettext("unable to find specified "
321fcf3ce44SJohn Forte 			    "mpath-support"));
322fcf3ce44SJohn Forte 		case ERR_MEMORY_ALLOCATION:
323fcf3ce44SJohn Forte 			return (gettext("Error: Memory allocation failure"));
324fcf3ce44SJohn Forte 		case TEXT_MORE_INFO:
325fcf3ce44SJohn Forte 			return (gettext("For more information, please see"));
326fcf3ce44SJohn Forte 		case TEXT_UNABLE_TO_COMPLETE:
327fcf3ce44SJohn Forte 			return (gettext("Unable to complete operation"));
328fcf3ce44SJohn Forte 		case ERR_FILE_DESCRIPTOR:
329fcf3ce44SJohn Forte 			return (gettext("ERROR: Failed getting file "
330fcf3ce44SJohn Forte 			    "descriptor"));
331fcf3ce44SJohn Forte 		case ERR_DEVID:
332fcf3ce44SJohn Forte 			return (gettext("ERROR: Failed attempt to get devid "
333fcf3ce44SJohn Forte 			    "information"));
334fcf3ce44SJohn Forte 		case ERR_LU_ACCESS_STATE_UNCHANGED:
335fcf3ce44SJohn Forte 			return (gettext("ERROR: LU access state unchanged.  "
336*d3cfd299SHyon Kim 			    "No standby TPG found."));
337fcf3ce44SJohn Forte 
338fcf3ce44SJohn Forte 		/* strings to display info */
339fcf3ce44SJohn Forte 		case TEXT_PATH_STATE_OKAY:
340fcf3ce44SJohn Forte 			return ("OK");
341fcf3ce44SJohn Forte 		case TEXT_PATH_STATE_PATH_ERR:
342fcf3ce44SJohn Forte 			return ("path error");
343fcf3ce44SJohn Forte 		case TEXT_PATH_STATE_LU_ERR:
344fcf3ce44SJohn Forte 			return ("LU error");
345fcf3ce44SJohn Forte 		case TEXT_PATH_STATE_RESERVED:
346fcf3ce44SJohn Forte 			return ("reserved");
347fcf3ce44SJohn Forte 		case TEXT_PATH_STATE_REMOVED:
348fcf3ce44SJohn Forte 			return ("unavailable");
349fcf3ce44SJohn Forte 		case TEXT_PATH_STATE_TRANSITIONING:
350fcf3ce44SJohn Forte 			return ("transitioning");
351fcf3ce44SJohn Forte 		case TEXT_PATH_STATE_OPERATIONAL_CLOSED:
352fcf3ce44SJohn Forte 			return ("operational but closed");
353fcf3ce44SJohn Forte 		case TEXT_PATH_STATE_INVALID_CLOSED:
354fcf3ce44SJohn Forte 			return ("invalid closed");
355fcf3ce44SJohn Forte 		case TEXT_PATH_STATE_OFFLINE_CLOSED:
356fcf3ce44SJohn Forte 			return ("operational but closed");
357fcf3ce44SJohn Forte 		case TEXT_ACCESS_STATE_ACTIVE_OPTIMIZED:
358fcf3ce44SJohn Forte 			return ("active optimized");
359fcf3ce44SJohn Forte 		case TEXT_ACCESS_STATE_ACTIVE_NONOPTIMIZED:
360fcf3ce44SJohn Forte 			return ("active not optimized");
361fcf3ce44SJohn Forte 		case TEXT_ACCESS_STATE_STANDBY:
362fcf3ce44SJohn Forte 			return ("standby");
363fcf3ce44SJohn Forte 		case TEXT_ACCESS_STATE_UNAVAILABLE:
364fcf3ce44SJohn Forte 			return ("unavailable");
365fcf3ce44SJohn Forte 		case TEXT_ACCESS_STATE_TRANSITIONING:
366fcf3ce44SJohn Forte 			return ("transitioning");
367fcf3ce44SJohn Forte 		case TEXT_ACCESS_STATE_ACTIVE:
368fcf3ce44SJohn Forte 			return ("active");
369fcf3ce44SJohn Forte 		case TEXT_ANY_DEVICE:
370fcf3ce44SJohn Forte 			return ("any device");
371fcf3ce44SJohn Forte 
372fcf3ce44SJohn Forte 		case TEXT_TRANS_PORT_TYPE_MPNODE:
373fcf3ce44SJohn Forte 			return ("Logical Multipath Port");
374fcf3ce44SJohn Forte 		case TEXT_TRANS_PORT_TYPE_FC:
375fcf3ce44SJohn Forte 			return ("Fibre Channel");
376fcf3ce44SJohn Forte 		case TEXT_TRANS_PORT_TYPE_SPI:
377fcf3ce44SJohn Forte 			return ("parallel SCSI");
378fcf3ce44SJohn Forte 		case TEXT_TRANS_PORT_TYPE_ISCSI:
379fcf3ce44SJohn Forte 			return ("iSCSI");
380fcf3ce44SJohn Forte 		case TEXT_TRANS_PORT_TYPE_IFB:
381fcf3ce44SJohn Forte 			return ("InfiniBand-Fibre Channel");
382fcf3ce44SJohn Forte 
383fcf3ce44SJohn Forte 
384fcf3ce44SJohn Forte 		default:
385fcf3ce44SJohn Forte 			return ("");
386fcf3ce44SJohn Forte 	}
387fcf3ce44SJohn Forte }
388