xref: /onnv-gate/usr/src/lib/storage/libg_fc/common/errormsgs.c (revision 7836:4e95154b5b7a)
1*7836SJohn.Forte@Sun.COM /*
2*7836SJohn.Forte@Sun.COM  * CDDL HEADER START
3*7836SJohn.Forte@Sun.COM  *
4*7836SJohn.Forte@Sun.COM  * The contents of this file are subject to the terms of the
5*7836SJohn.Forte@Sun.COM  * Common Development and Distribution License (the "License").
6*7836SJohn.Forte@Sun.COM  * You may not use this file except in compliance with the License.
7*7836SJohn.Forte@Sun.COM  *
8*7836SJohn.Forte@Sun.COM  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*7836SJohn.Forte@Sun.COM  * or http://www.opensolaris.org/os/licensing.
10*7836SJohn.Forte@Sun.COM  * See the License for the specific language governing permissions
11*7836SJohn.Forte@Sun.COM  * and limitations under the License.
12*7836SJohn.Forte@Sun.COM  *
13*7836SJohn.Forte@Sun.COM  * When distributing Covered Code, include this CDDL HEADER in each
14*7836SJohn.Forte@Sun.COM  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*7836SJohn.Forte@Sun.COM  * If applicable, add the following below this CDDL HEADER, with the
16*7836SJohn.Forte@Sun.COM  * fields enclosed by brackets "[]" replaced with your own identifying
17*7836SJohn.Forte@Sun.COM  * information: Portions Copyright [yyyy] [name of copyright owner]
18*7836SJohn.Forte@Sun.COM  *
19*7836SJohn.Forte@Sun.COM  * CDDL HEADER END
20*7836SJohn.Forte@Sun.COM  */
21*7836SJohn.Forte@Sun.COM /*
22*7836SJohn.Forte@Sun.COM  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23*7836SJohn.Forte@Sun.COM  * Use is subject to license terms.
24*7836SJohn.Forte@Sun.COM  */
25*7836SJohn.Forte@Sun.COM 
26*7836SJohn.Forte@Sun.COM 
27*7836SJohn.Forte@Sun.COM /*LINTLIBRARY*/
28*7836SJohn.Forte@Sun.COM 
29*7836SJohn.Forte@Sun.COM /*
30*7836SJohn.Forte@Sun.COM  *	This module provides error messages to the
31*7836SJohn.Forte@Sun.COM  *	a5k and g_fc libraries.
32*7836SJohn.Forte@Sun.COM  */
33*7836SJohn.Forte@Sun.COM 
34*7836SJohn.Forte@Sun.COM /*
35*7836SJohn.Forte@Sun.COM  * I18N message number ranges
36*7836SJohn.Forte@Sun.COM  *  This file: 10000 - 10499
37*7836SJohn.Forte@Sun.COM  *  Shared common messages: 1 - 1999
38*7836SJohn.Forte@Sun.COM  */
39*7836SJohn.Forte@Sun.COM 
40*7836SJohn.Forte@Sun.COM /* #define	_POSIX_SOURCE 1 */
41*7836SJohn.Forte@Sun.COM 
42*7836SJohn.Forte@Sun.COM 
43*7836SJohn.Forte@Sun.COM /*	Includes	*/
44*7836SJohn.Forte@Sun.COM #include	<stdlib.h>
45*7836SJohn.Forte@Sun.COM #include	<stdio.h>
46*7836SJohn.Forte@Sun.COM #include	<fcntl.h>
47*7836SJohn.Forte@Sun.COM #include	<nl_types.h>
48*7836SJohn.Forte@Sun.COM #include	<sys/scsi/scsi.h>
49*7836SJohn.Forte@Sun.COM #include	<stgcom.h>
50*7836SJohn.Forte@Sun.COM #include	<l_error.h>	/* error msg defines. */
51*7836SJohn.Forte@Sun.COM #include	<l_common.h>	/* I18N	message define */
52*7836SJohn.Forte@Sun.COM #include	<g_state.h>
53*7836SJohn.Forte@Sun.COM 
54*7836SJohn.Forte@Sun.COM #include	<string.h> /* For strerror */
55*7836SJohn.Forte@Sun.COM #include	<errno.h>
56*7836SJohn.Forte@Sun.COM 
57*7836SJohn.Forte@Sun.COM 
58*7836SJohn.Forte@Sun.COM /*	Defines		*/
59*7836SJohn.Forte@Sun.COM #define	MAXLEN	1000
60*7836SJohn.Forte@Sun.COM 
61*7836SJohn.Forte@Sun.COM 
62*7836SJohn.Forte@Sun.COM 
63*7836SJohn.Forte@Sun.COM /*
64*7836SJohn.Forte@Sun.COM  * Decodes the SCSI sense byte to a string.
65*7836SJohn.Forte@Sun.COM  *
66*7836SJohn.Forte@Sun.COM  * RETURNS:
67*7836SJohn.Forte@Sun.COM  *	character string
68*7836SJohn.Forte@Sun.COM  */
69*7836SJohn.Forte@Sun.COM static char *
decode_sense_byte(uchar_t status)70*7836SJohn.Forte@Sun.COM decode_sense_byte(uchar_t status)
71*7836SJohn.Forte@Sun.COM {
72*7836SJohn.Forte@Sun.COM 	switch (status & STATUS_MASK) {
73*7836SJohn.Forte@Sun.COM 		case STATUS_GOOD:
74*7836SJohn.Forte@Sun.COM 			return (MSGSTR(10000, "Good status"));
75*7836SJohn.Forte@Sun.COM 
76*7836SJohn.Forte@Sun.COM 		case STATUS_CHECK:
77*7836SJohn.Forte@Sun.COM 			return (MSGSTR(128, "Check condition"));
78*7836SJohn.Forte@Sun.COM 
79*7836SJohn.Forte@Sun.COM 		case STATUS_MET:
80*7836SJohn.Forte@Sun.COM 			return (MSGSTR(124, "Condition met"));
81*7836SJohn.Forte@Sun.COM 
82*7836SJohn.Forte@Sun.COM 		case STATUS_BUSY:
83*7836SJohn.Forte@Sun.COM 			return (MSGSTR(37, "Busy"));
84*7836SJohn.Forte@Sun.COM 
85*7836SJohn.Forte@Sun.COM 		case STATUS_INTERMEDIATE:
86*7836SJohn.Forte@Sun.COM 			return (MSGSTR(10001, "Intermediate"));
87*7836SJohn.Forte@Sun.COM 
88*7836SJohn.Forte@Sun.COM 		case STATUS_INTERMEDIATE_MET:
89*7836SJohn.Forte@Sun.COM 			return (MSGSTR(10002, "Intermediate - condition met"));
90*7836SJohn.Forte@Sun.COM 
91*7836SJohn.Forte@Sun.COM 		case STATUS_RESERVATION_CONFLICT:
92*7836SJohn.Forte@Sun.COM 			return (MSGSTR(10003, "Reservation_conflict"));
93*7836SJohn.Forte@Sun.COM 
94*7836SJohn.Forte@Sun.COM 		case STATUS_TERMINATED:
95*7836SJohn.Forte@Sun.COM 			return (MSGSTR(126, "Command terminated"));
96*7836SJohn.Forte@Sun.COM 
97*7836SJohn.Forte@Sun.COM 		case STATUS_QFULL:
98*7836SJohn.Forte@Sun.COM 			return (MSGSTR(83, "Queue full"));
99*7836SJohn.Forte@Sun.COM 
100*7836SJohn.Forte@Sun.COM 		default:
101*7836SJohn.Forte@Sun.COM 			return (MSGSTR(4, "Unknown status"));
102*7836SJohn.Forte@Sun.COM 	}
103*7836SJohn.Forte@Sun.COM }
104*7836SJohn.Forte@Sun.COM 
105*7836SJohn.Forte@Sun.COM 
106*7836SJohn.Forte@Sun.COM /*
107*7836SJohn.Forte@Sun.COM  * This function finds a predefined error string to a given
108*7836SJohn.Forte@Sun.COM  * error number (errornum), allocates memory for the string
109*7836SJohn.Forte@Sun.COM  * and returns the corresponding error message to the caller.
110*7836SJohn.Forte@Sun.COM  *
111*7836SJohn.Forte@Sun.COM  * RETURNS
112*7836SJohn.Forte@Sun.COM  *	error string	if O.K.
113*7836SJohn.Forte@Sun.COM  *	NULL		otherwise
114*7836SJohn.Forte@Sun.COM  */
115*7836SJohn.Forte@Sun.COM char
g_get_errString(int errornum)116*7836SJohn.Forte@Sun.COM *g_get_errString(int errornum)
117*7836SJohn.Forte@Sun.COM {
118*7836SJohn.Forte@Sun.COM char	err_msg[MAXLEN], *errStrg;
119*7836SJohn.Forte@Sun.COM 
120*7836SJohn.Forte@Sun.COM 	err_msg[0] = '\0'; /* Just in case */
121*7836SJohn.Forte@Sun.COM 	if (errornum < L_BASE) {
122*7836SJohn.Forte@Sun.COM 			/* Some sort of random system error most likely */
123*7836SJohn.Forte@Sun.COM 			errStrg = strerror(errno);
124*7836SJohn.Forte@Sun.COM 			if (errStrg != NULL) {
125*7836SJohn.Forte@Sun.COM 				(void) strcpy(err_msg, errStrg);
126*7836SJohn.Forte@Sun.COM 			} else { /* Something's _really_ messed up */
127*7836SJohn.Forte@Sun.COM 				(void) sprintf(err_msg,
128*7836SJohn.Forte@Sun.COM 					MSGSTR(10081,
129*7836SJohn.Forte@Sun.COM 					" Error: could not decode the"
130*7836SJohn.Forte@Sun.COM 					" error message.\n"
131*7836SJohn.Forte@Sun.COM 					" The given error message is not"
132*7836SJohn.Forte@Sun.COM 					" defined in the library.\n"
133*7836SJohn.Forte@Sun.COM 					" Message number: %d.\n"), errornum);
134*7836SJohn.Forte@Sun.COM 			}
135*7836SJohn.Forte@Sun.COM 
136*7836SJohn.Forte@Sun.COM 	/* Make sure ALL CASES set err_msg to something */
137*7836SJohn.Forte@Sun.COM 	} else switch (errornum) {
138*7836SJohn.Forte@Sun.COM 		case L_SCSI_ERROR:
139*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
140*7836SJohn.Forte@Sun.COM 				MSGSTR(10096,
141*7836SJohn.Forte@Sun.COM 				" Error: SCSI failure."));
142*7836SJohn.Forte@Sun.COM 			break;
143*7836SJohn.Forte@Sun.COM 
144*7836SJohn.Forte@Sun.COM 		case L_PR_INVLD_TRNSFR_LEN:
145*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
146*7836SJohn.Forte@Sun.COM 				MSGSTR(10005,
147*7836SJohn.Forte@Sun.COM 				" Error: Persistant Reserve command"
148*7836SJohn.Forte@Sun.COM 				" transfer length not word aligned."));
149*7836SJohn.Forte@Sun.COM 			break;
150*7836SJohn.Forte@Sun.COM 
151*7836SJohn.Forte@Sun.COM 		case L_RD_NO_DISK_ELEM:
152*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
153*7836SJohn.Forte@Sun.COM 				MSGSTR(10006,
154*7836SJohn.Forte@Sun.COM 				" Error: Could not find the disk elements"
155*7836SJohn.Forte@Sun.COM 				" in the Receive Diagnostic pages."));
156*7836SJohn.Forte@Sun.COM 			break;
157*7836SJohn.Forte@Sun.COM 
158*7836SJohn.Forte@Sun.COM 		case L_RD_INVLD_TRNSFR_LEN:
159*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
160*7836SJohn.Forte@Sun.COM 				MSGSTR(10007,
161*7836SJohn.Forte@Sun.COM 				" Error: Receive Diagnostic command"
162*7836SJohn.Forte@Sun.COM 				" transfer length not word aligned."));
163*7836SJohn.Forte@Sun.COM 			break;
164*7836SJohn.Forte@Sun.COM 
165*7836SJohn.Forte@Sun.COM 		case L_ILLEGAL_MODE_SENSE_PAGE:
166*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
167*7836SJohn.Forte@Sun.COM 				MSGSTR(10008,
168*7836SJohn.Forte@Sun.COM 				" Error: Programming error - "
169*7836SJohn.Forte@Sun.COM 				"illegal Mode Sense parameter."));
170*7836SJohn.Forte@Sun.COM 			break;
171*7836SJohn.Forte@Sun.COM 
172*7836SJohn.Forte@Sun.COM 		case L_INVALID_NO_OF_ENVSEN_PAGES:
173*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
174*7836SJohn.Forte@Sun.COM 				MSGSTR(10009,
175*7836SJohn.Forte@Sun.COM 				" Error: Invalid no. of sense pages.\n"
176*7836SJohn.Forte@Sun.COM 				" Could not get valid sense page"
177*7836SJohn.Forte@Sun.COM 				" information from the device."));
178*7836SJohn.Forte@Sun.COM 			break;
179*7836SJohn.Forte@Sun.COM 
180*7836SJohn.Forte@Sun.COM 		case L_INVALID_BUF_LEN:
181*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
182*7836SJohn.Forte@Sun.COM 				MSGSTR(10010,
183*7836SJohn.Forte@Sun.COM 				" Error: Invalid buffer length.\n"
184*7836SJohn.Forte@Sun.COM 				" Could not get diagnostic "
185*7836SJohn.Forte@Sun.COM 				" information from the device."));
186*7836SJohn.Forte@Sun.COM 			break;
187*7836SJohn.Forte@Sun.COM 
188*7836SJohn.Forte@Sun.COM 		case L_INVALID_PATH:
189*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
190*7836SJohn.Forte@Sun.COM 				MSGSTR(113,
191*7836SJohn.Forte@Sun.COM 				" Error: Invalid pathname"));
192*7836SJohn.Forte@Sun.COM 			break;
193*7836SJohn.Forte@Sun.COM 
194*7836SJohn.Forte@Sun.COM 		case L_NO_PHYS_PATH:
195*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
196*7836SJohn.Forte@Sun.COM 				MSGSTR(10011,
197*7836SJohn.Forte@Sun.COM 				" Error: Could not get"
198*7836SJohn.Forte@Sun.COM 				" physical path to the device."));
199*7836SJohn.Forte@Sun.COM 			break;
200*7836SJohn.Forte@Sun.COM 
201*7836SJohn.Forte@Sun.COM 		case L_NO_SES_PATH:
202*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
203*7836SJohn.Forte@Sun.COM 				MSGSTR(10098,
204*7836SJohn.Forte@Sun.COM 				" Error: No SES found"
205*7836SJohn.Forte@Sun.COM 				" for the device path."));
206*7836SJohn.Forte@Sun.COM 			break;
207*7836SJohn.Forte@Sun.COM 
208*7836SJohn.Forte@Sun.COM 		case L_INVLD_PATH_NO_SLASH_FND:
209*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
210*7836SJohn.Forte@Sun.COM 				MSGSTR(10012,
211*7836SJohn.Forte@Sun.COM 				"Error in the device physical path."));
212*7836SJohn.Forte@Sun.COM 			break;
213*7836SJohn.Forte@Sun.COM 
214*7836SJohn.Forte@Sun.COM 		case L_INVLD_PATH_NO_ATSIGN_FND:
215*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
216*7836SJohn.Forte@Sun.COM 				MSGSTR(10013,
217*7836SJohn.Forte@Sun.COM 				" Error in the device physical path:"
218*7836SJohn.Forte@Sun.COM 				" no @ found."));
219*7836SJohn.Forte@Sun.COM 			break;
220*7836SJohn.Forte@Sun.COM 
221*7836SJohn.Forte@Sun.COM 		case L_INVALID_SLOT:
222*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
223*7836SJohn.Forte@Sun.COM 				MSGSTR(10014,
224*7836SJohn.Forte@Sun.COM 				" Error: Invalid path format."
225*7836SJohn.Forte@Sun.COM 				" Invalid slot."));
226*7836SJohn.Forte@Sun.COM 			break;
227*7836SJohn.Forte@Sun.COM 
228*7836SJohn.Forte@Sun.COM 		case L_INVALID_LED_RQST:
229*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
230*7836SJohn.Forte@Sun.COM 				MSGSTR(10015,
231*7836SJohn.Forte@Sun.COM 				" Error: Invalid LED request."));
232*7836SJohn.Forte@Sun.COM 			break;
233*7836SJohn.Forte@Sun.COM 
234*7836SJohn.Forte@Sun.COM 		case L_INVALID_PATH_FORMAT:
235*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
236*7836SJohn.Forte@Sun.COM 				MSGSTR(10016,
237*7836SJohn.Forte@Sun.COM 				" Error: Invalid path format."));
238*7836SJohn.Forte@Sun.COM 			break;
239*7836SJohn.Forte@Sun.COM 
240*7836SJohn.Forte@Sun.COM 		case L_OPEN_PATH_FAIL:
241*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
242*7836SJohn.Forte@Sun.COM 				MSGSTR(10017,
243*7836SJohn.Forte@Sun.COM 				" Error opening the path."));
244*7836SJohn.Forte@Sun.COM 			break;
245*7836SJohn.Forte@Sun.COM 
246*7836SJohn.Forte@Sun.COM 		case L_INVALID_PASSWORD_LEN:
247*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
248*7836SJohn.Forte@Sun.COM 				MSGSTR(10018,
249*7836SJohn.Forte@Sun.COM 				"Error: Invalid password length."));
250*7836SJohn.Forte@Sun.COM 			break;
251*7836SJohn.Forte@Sun.COM 
252*7836SJohn.Forte@Sun.COM 		case L_INVLD_PHYS_PATH_TO_DISK:
253*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
254*7836SJohn.Forte@Sun.COM 				MSGSTR(10019,
255*7836SJohn.Forte@Sun.COM 				" Error: Physical path not of a disk."));
256*7836SJohn.Forte@Sun.COM 			break;
257*7836SJohn.Forte@Sun.COM 
258*7836SJohn.Forte@Sun.COM 		case L_INVLD_ID_FOUND:
259*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
260*7836SJohn.Forte@Sun.COM 				MSGSTR(10020,
261*7836SJohn.Forte@Sun.COM 				" Error in the device physical path:"
262*7836SJohn.Forte@Sun.COM 				" Invalid ID found in the path."));
263*7836SJohn.Forte@Sun.COM 			break;
264*7836SJohn.Forte@Sun.COM 
265*7836SJohn.Forte@Sun.COM 		case L_INVLD_WWN_FORMAT:
266*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
267*7836SJohn.Forte@Sun.COM 				MSGSTR(10021,
268*7836SJohn.Forte@Sun.COM 				" Error in the device physical path:"
269*7836SJohn.Forte@Sun.COM 				" Invalid wwn format."));
270*7836SJohn.Forte@Sun.COM 
271*7836SJohn.Forte@Sun.COM 			break;
272*7836SJohn.Forte@Sun.COM 
273*7836SJohn.Forte@Sun.COM 		case L_NO_VALID_PATH:
274*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
275*7836SJohn.Forte@Sun.COM 				MSGSTR(10022,
276*7836SJohn.Forte@Sun.COM 				" Error: Could not find valid path to"
277*7836SJohn.Forte@Sun.COM 				" the device."));
278*7836SJohn.Forte@Sun.COM 			break;
279*7836SJohn.Forte@Sun.COM 
280*7836SJohn.Forte@Sun.COM 		case L_NO_WWN_FOUND_IN_PATH:
281*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
282*7836SJohn.Forte@Sun.COM 				MSGSTR(10023,
283*7836SJohn.Forte@Sun.COM 				" Error in the device physical path:"
284*7836SJohn.Forte@Sun.COM 				" No WWN found."));
285*7836SJohn.Forte@Sun.COM 
286*7836SJohn.Forte@Sun.COM 			break;
287*7836SJohn.Forte@Sun.COM 
288*7836SJohn.Forte@Sun.COM 		case L_NO_NODE_WWN_IN_WWNLIST:
289*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
290*7836SJohn.Forte@Sun.COM 				MSGSTR(10024,
291*7836SJohn.Forte@Sun.COM 				" Error: Device's Node WWN is not"
292*7836SJohn.Forte@Sun.COM 				" found in the WWN list.\n"));
293*7836SJohn.Forte@Sun.COM 			break;
294*7836SJohn.Forte@Sun.COM 
295*7836SJohn.Forte@Sun.COM 		case L_NO_NODE_WWN_IN_BOXLIST:
296*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
297*7836SJohn.Forte@Sun.COM 				MSGSTR(10025,
298*7836SJohn.Forte@Sun.COM 				" Error: Device's Node WWN is not"
299*7836SJohn.Forte@Sun.COM 				" found in the Box list.\n"));
300*7836SJohn.Forte@Sun.COM 			break;
301*7836SJohn.Forte@Sun.COM 
302*7836SJohn.Forte@Sun.COM 		case L_NULL_WWN_LIST:
303*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
304*7836SJohn.Forte@Sun.COM 				MSGSTR(10026,
305*7836SJohn.Forte@Sun.COM 				" Error: Null WWN list found."));
306*7836SJohn.Forte@Sun.COM 			break;
307*7836SJohn.Forte@Sun.COM 
308*7836SJohn.Forte@Sun.COM 		case L_NO_LOOP_ADDRS_FOUND:
309*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
310*7836SJohn.Forte@Sun.COM 				MSGSTR(10027,
311*7836SJohn.Forte@Sun.COM 				" Error: Could not find the loop address for "
312*7836SJohn.Forte@Sun.COM 				" the device at physical path."));
313*7836SJohn.Forte@Sun.COM 
314*7836SJohn.Forte@Sun.COM 			break;
315*7836SJohn.Forte@Sun.COM 
316*7836SJohn.Forte@Sun.COM 		case L_INVLD_PORT_IN_PATH:
317*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
318*7836SJohn.Forte@Sun.COM 				MSGSTR(10028,
319*7836SJohn.Forte@Sun.COM 				"Error in the device physical path:"
320*7836SJohn.Forte@Sun.COM 				" Invalid port number found."
321*7836SJohn.Forte@Sun.COM 				" (Should be 0 or 1)."));
322*7836SJohn.Forte@Sun.COM 
323*7836SJohn.Forte@Sun.COM 			break;
324*7836SJohn.Forte@Sun.COM 
325*7836SJohn.Forte@Sun.COM 		case L_INVALID_LOOP_MAP:
326*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
327*7836SJohn.Forte@Sun.COM 				MSGSTR(10029,
328*7836SJohn.Forte@Sun.COM 				"Error: Invalid loop map found."));
329*7836SJohn.Forte@Sun.COM 			break;
330*7836SJohn.Forte@Sun.COM 
331*7836SJohn.Forte@Sun.COM 		case L_SFIOCGMAP_IOCTL_FAIL:
332*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
333*7836SJohn.Forte@Sun.COM 				MSGSTR(10030,
334*7836SJohn.Forte@Sun.COM 				" Error: SFIOCGMAP ioctl failed."
335*7836SJohn.Forte@Sun.COM 				" Cannot read loop map."));
336*7836SJohn.Forte@Sun.COM 			break;
337*7836SJohn.Forte@Sun.COM 
338*7836SJohn.Forte@Sun.COM 		case L_FCIO_GETMAP_IOCTL_FAIL:
339*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
340*7836SJohn.Forte@Sun.COM 				MSGSTR(10031,
341*7836SJohn.Forte@Sun.COM 				" Error: FCIO_GETMAP ioctl failed."
342*7836SJohn.Forte@Sun.COM 				" Cannot read loop map."));
343*7836SJohn.Forte@Sun.COM 			break;
344*7836SJohn.Forte@Sun.COM 
345*7836SJohn.Forte@Sun.COM 		case L_FCIO_LINKSTATUS_FAILED:
346*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
347*7836SJohn.Forte@Sun.COM 				MSGSTR(10032,
348*7836SJohn.Forte@Sun.COM 				" Error: FCIO_LINKSTATUS ioctl failed."
349*7836SJohn.Forte@Sun.COM 				" Cannot read loop map."));
350*7836SJohn.Forte@Sun.COM 			break;
351*7836SJohn.Forte@Sun.COM 
352*7836SJohn.Forte@Sun.COM 		case L_FCIOGETMAP_INVLD_LEN:
353*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
354*7836SJohn.Forte@Sun.COM 				MSGSTR(10033,
355*7836SJohn.Forte@Sun.COM 				" Error: FCIO_GETMAP ioctl returned"
356*7836SJohn.Forte@Sun.COM 				" an invalid parameter:"
357*7836SJohn.Forte@Sun.COM 				" # entries to large."));
358*7836SJohn.Forte@Sun.COM 			break;
359*7836SJohn.Forte@Sun.COM 
360*7836SJohn.Forte@Sun.COM 		case L_FCIO_FORCE_LIP_FAIL:
361*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
362*7836SJohn.Forte@Sun.COM 				MSGSTR(10034,
363*7836SJohn.Forte@Sun.COM 				" Error: FCIO_FORCE_LIP ioctl failed."));
364*7836SJohn.Forte@Sun.COM 			break;
365*7836SJohn.Forte@Sun.COM 
366*7836SJohn.Forte@Sun.COM 		case L_FCIO_FORCE_LIP_PARTIAL_FAIL:
367*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
368*7836SJohn.Forte@Sun.COM 				MSGSTR(10115,
369*7836SJohn.Forte@Sun.COM 				" Error: FCIO_FORCE_LIP ioctl failed on one"
370*7836SJohn.Forte@Sun.COM 				" or more (but not all) of the paths."));
371*7836SJohn.Forte@Sun.COM 			break;
372*7836SJohn.Forte@Sun.COM 
373*7836SJohn.Forte@Sun.COM 		case L_DWNLD_CHKSUM_FAILED:
374*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
375*7836SJohn.Forte@Sun.COM 				MSGSTR(10035,
376*7836SJohn.Forte@Sun.COM 				"Error: Download file checksum failed."));
377*7836SJohn.Forte@Sun.COM 
378*7836SJohn.Forte@Sun.COM 			break;
379*7836SJohn.Forte@Sun.COM 
380*7836SJohn.Forte@Sun.COM 		case L_DWNLD_READ_HEADER_FAIL:
381*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
382*7836SJohn.Forte@Sun.COM 				MSGSTR(10036,
383*7836SJohn.Forte@Sun.COM 				" Error: Reading download file exec"
384*7836SJohn.Forte@Sun.COM 				" header failed."));
385*7836SJohn.Forte@Sun.COM 			break;
386*7836SJohn.Forte@Sun.COM 
387*7836SJohn.Forte@Sun.COM 		case L_DWNLD_READ_INCORRECT_BYTES:
388*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
389*7836SJohn.Forte@Sun.COM 				MSGSTR(10037,
390*7836SJohn.Forte@Sun.COM 				" Error: Incorrect number of bytes read."));
391*7836SJohn.Forte@Sun.COM 			break;
392*7836SJohn.Forte@Sun.COM 
393*7836SJohn.Forte@Sun.COM 		case L_DWNLD_INVALID_TEXT_SIZE:
394*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
395*7836SJohn.Forte@Sun.COM 				MSGSTR(10038,
396*7836SJohn.Forte@Sun.COM 				" Error: Reading text segment: "
397*7836SJohn.Forte@Sun.COM 				" Found wrong size."));
398*7836SJohn.Forte@Sun.COM 			break;
399*7836SJohn.Forte@Sun.COM 
400*7836SJohn.Forte@Sun.COM 		case L_DWNLD_READ_ERROR:
401*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
402*7836SJohn.Forte@Sun.COM 				MSGSTR(10039,
403*7836SJohn.Forte@Sun.COM 				" Error: Failed to read download file."));
404*7836SJohn.Forte@Sun.COM 			break;
405*7836SJohn.Forte@Sun.COM 
406*7836SJohn.Forte@Sun.COM 		case L_DWNLD_BAD_FRMWARE:
407*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
408*7836SJohn.Forte@Sun.COM 				MSGSTR(10040,
409*7836SJohn.Forte@Sun.COM 				" Error: Bad Firmware MAGIC."));
410*7836SJohn.Forte@Sun.COM 			break;
411*7836SJohn.Forte@Sun.COM 
412*7836SJohn.Forte@Sun.COM 		case L_DWNLD_TIMED_OUT:
413*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
414*7836SJohn.Forte@Sun.COM 				MSGSTR(10041,
415*7836SJohn.Forte@Sun.COM 				" Error: Timed out in 5 minutes"
416*7836SJohn.Forte@Sun.COM 				" waiting for the"
417*7836SJohn.Forte@Sun.COM 				" IB to become available."));
418*7836SJohn.Forte@Sun.COM 			break;
419*7836SJohn.Forte@Sun.COM 
420*7836SJohn.Forte@Sun.COM 		case L_REC_DIAG_PG1:
421*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
422*7836SJohn.Forte@Sun.COM 				MSGSTR(10042,
423*7836SJohn.Forte@Sun.COM 				" Error parsing the Receive"
424*7836SJohn.Forte@Sun.COM 				" diagnostic page."));
425*7836SJohn.Forte@Sun.COM 			break;
426*7836SJohn.Forte@Sun.COM 
427*7836SJohn.Forte@Sun.COM 		case L_TRANSFER_LEN:
428*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
429*7836SJohn.Forte@Sun.COM 				MSGSTR(10043, "  "));
430*7836SJohn.Forte@Sun.COM 			break;
431*7836SJohn.Forte@Sun.COM 
432*7836SJohn.Forte@Sun.COM 		case L_REQUIRE_FILE:
433*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
434*7836SJohn.Forte@Sun.COM 				MSGSTR(10109,
435*7836SJohn.Forte@Sun.COM 				" Error: No default file.  You must specify"
436*7836SJohn.Forte@Sun.COM 				" the filename path."));
437*7836SJohn.Forte@Sun.COM 			break;
438*7836SJohn.Forte@Sun.COM 
439*7836SJohn.Forte@Sun.COM 		case L_MALLOC_FAILED:
440*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
441*7836SJohn.Forte@Sun.COM 				MSGSTR(10,
442*7836SJohn.Forte@Sun.COM 				" Error: Unable to allocate memory."));
443*7836SJohn.Forte@Sun.COM 			break;
444*7836SJohn.Forte@Sun.COM 
445*7836SJohn.Forte@Sun.COM 		case L_LOCALTIME_ERROR:
446*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
447*7836SJohn.Forte@Sun.COM 				MSGSTR(10044,
448*7836SJohn.Forte@Sun.COM 				" Error: Could not convert time"
449*7836SJohn.Forte@Sun.COM 				" to broken-down time: Hrs/Mins/Secs."));
450*7836SJohn.Forte@Sun.COM 			break;
451*7836SJohn.Forte@Sun.COM 
452*7836SJohn.Forte@Sun.COM 		case L_SELECT_ERROR:
453*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
454*7836SJohn.Forte@Sun.COM 				MSGSTR(10045,
455*7836SJohn.Forte@Sun.COM 				" select() error during retry:"
456*7836SJohn.Forte@Sun.COM 				" Could not wait for"
457*7836SJohn.Forte@Sun.COM 				" specified time."));
458*7836SJohn.Forte@Sun.COM 			break;
459*7836SJohn.Forte@Sun.COM 
460*7836SJohn.Forte@Sun.COM 		case L_NO_DISK_DEV_FOUND:
461*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
462*7836SJohn.Forte@Sun.COM 				MSGSTR(10046,
463*7836SJohn.Forte@Sun.COM 				" Error: No disk devices found"
464*7836SJohn.Forte@Sun.COM 				" in the /dev/rdsk"
465*7836SJohn.Forte@Sun.COM 				" directory."));
466*7836SJohn.Forte@Sun.COM 			break;
467*7836SJohn.Forte@Sun.COM 
468*7836SJohn.Forte@Sun.COM 		case L_NO_TAPE_DEV_FOUND:
469*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
470*7836SJohn.Forte@Sun.COM 				MSGSTR(10047,
471*7836SJohn.Forte@Sun.COM 				" Error: No tape devices found"
472*7836SJohn.Forte@Sun.COM 				" in the /dev/rmt"
473*7836SJohn.Forte@Sun.COM 				" directory."));
474*7836SJohn.Forte@Sun.COM 			break;
475*7836SJohn.Forte@Sun.COM 
476*7836SJohn.Forte@Sun.COM 		case L_LSTAT_ERROR:
477*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
478*7836SJohn.Forte@Sun.COM 				MSGSTR(10048,
479*7836SJohn.Forte@Sun.COM 				" lstat() error: Cannot obtain status"
480*7836SJohn.Forte@Sun.COM 				" for the device."));
481*7836SJohn.Forte@Sun.COM 			break;
482*7836SJohn.Forte@Sun.COM 
483*7836SJohn.Forte@Sun.COM 		case L_SYMLINK_ERROR:
484*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
485*7836SJohn.Forte@Sun.COM 				MSGSTR(10049,
486*7836SJohn.Forte@Sun.COM 				" Error: Could not read the symbolic link."));
487*7836SJohn.Forte@Sun.COM 			break;
488*7836SJohn.Forte@Sun.COM 
489*7836SJohn.Forte@Sun.COM 		case L_UNAME_FAILED:
490*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
491*7836SJohn.Forte@Sun.COM 				MSGSTR(10050,
492*7836SJohn.Forte@Sun.COM 				" uname() error: Could not obtain the"
493*7836SJohn.Forte@Sun.COM 				" architeture of the host machine."));
494*7836SJohn.Forte@Sun.COM 			break;
495*7836SJohn.Forte@Sun.COM 
496*7836SJohn.Forte@Sun.COM 		case L_DRVCONFIG_ERROR:
497*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
498*7836SJohn.Forte@Sun.COM 				MSGSTR(10051,
499*7836SJohn.Forte@Sun.COM 				" Error: Could not run drvconfig."));
500*7836SJohn.Forte@Sun.COM 			break;
501*7836SJohn.Forte@Sun.COM 
502*7836SJohn.Forte@Sun.COM 		case L_DISKS_ERROR:
503*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
504*7836SJohn.Forte@Sun.COM 				MSGSTR(10052,
505*7836SJohn.Forte@Sun.COM 				" Error: Could not run disks."));
506*7836SJohn.Forte@Sun.COM 			break;
507*7836SJohn.Forte@Sun.COM 
508*7836SJohn.Forte@Sun.COM 		case L_DEVLINKS_ERROR:
509*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
510*7836SJohn.Forte@Sun.COM 				MSGSTR(10053,
511*7836SJohn.Forte@Sun.COM 				" Error: Could not run devlinks."));
512*7836SJohn.Forte@Sun.COM 			break;
513*7836SJohn.Forte@Sun.COM 
514*7836SJohn.Forte@Sun.COM 		case L_READ_DEV_DIR_ERROR:
515*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
516*7836SJohn.Forte@Sun.COM 				MSGSTR(10054,
517*7836SJohn.Forte@Sun.COM 				" Error: Could not read /dev/rdsk"
518*7836SJohn.Forte@Sun.COM 				" directory."));
519*7836SJohn.Forte@Sun.COM 			break;
520*7836SJohn.Forte@Sun.COM 
521*7836SJohn.Forte@Sun.COM 		case L_OPEN_ES_DIR_FAILED:
522*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
523*7836SJohn.Forte@Sun.COM 				MSGSTR(10055,
524*7836SJohn.Forte@Sun.COM 				" Error: Could not open /dev/es"
525*7836SJohn.Forte@Sun.COM 				" directory."));
526*7836SJohn.Forte@Sun.COM 			break;
527*7836SJohn.Forte@Sun.COM 
528*7836SJohn.Forte@Sun.COM 		case L_LSTAT_ES_DIR_ERROR:
529*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
530*7836SJohn.Forte@Sun.COM 				MSGSTR(10056,
531*7836SJohn.Forte@Sun.COM 				" lstat() error: Could not get status"
532*7836SJohn.Forte@Sun.COM 				" for /dev/es directory."));
533*7836SJohn.Forte@Sun.COM 			break;
534*7836SJohn.Forte@Sun.COM 
535*7836SJohn.Forte@Sun.COM 		case L_DEV_BUSY:
536*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
537*7836SJohn.Forte@Sun.COM 				MSGSTR(10057,
538*7836SJohn.Forte@Sun.COM 				" Error: Could not offline the device\n"
539*7836SJohn.Forte@Sun.COM 				" May be Busy."));
540*7836SJohn.Forte@Sun.COM 			break;
541*7836SJohn.Forte@Sun.COM 
542*7836SJohn.Forte@Sun.COM 		case L_EXCL_OPEN_FAILED:
543*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
544*7836SJohn.Forte@Sun.COM 				MSGSTR(10058,
545*7836SJohn.Forte@Sun.COM 				" Error: Could not open device in"
546*7836SJohn.Forte@Sun.COM 				" exclusive mode."
547*7836SJohn.Forte@Sun.COM 				"  May already be open."));
548*7836SJohn.Forte@Sun.COM 			break;
549*7836SJohn.Forte@Sun.COM 
550*7836SJohn.Forte@Sun.COM 		case L_DEVICE_RESERVED:
551*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
552*7836SJohn.Forte@Sun.COM 				MSGSTR(10059,
553*7836SJohn.Forte@Sun.COM 				" Error: Disk is reserved."));
554*7836SJohn.Forte@Sun.COM 			break;
555*7836SJohn.Forte@Sun.COM 
556*7836SJohn.Forte@Sun.COM 		case L_DISKS_RESERVED:
557*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
558*7836SJohn.Forte@Sun.COM 				MSGSTR(10060,
559*7836SJohn.Forte@Sun.COM 				" Error: One or more disks in"
560*7836SJohn.Forte@Sun.COM 				" SENA are reserved."));
561*7836SJohn.Forte@Sun.COM 			break;
562*7836SJohn.Forte@Sun.COM 
563*7836SJohn.Forte@Sun.COM 		case L_SLOT_EMPTY:
564*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
565*7836SJohn.Forte@Sun.COM 				MSGSTR(10061,
566*7836SJohn.Forte@Sun.COM 				" Error: Slot is empty."));
567*7836SJohn.Forte@Sun.COM 			break;
568*7836SJohn.Forte@Sun.COM 
569*7836SJohn.Forte@Sun.COM 		case L_ACQUIRE_FAIL:
570*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
571*7836SJohn.Forte@Sun.COM 				MSGSTR(10062,
572*7836SJohn.Forte@Sun.COM 				" Error: Could not acquire"
573*7836SJohn.Forte@Sun.COM 				" the device."));
574*7836SJohn.Forte@Sun.COM 			break;
575*7836SJohn.Forte@Sun.COM 
576*7836SJohn.Forte@Sun.COM 		case L_POWER_OFF_FAIL_BUSY:
577*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
578*7836SJohn.Forte@Sun.COM 				MSGSTR(10063,
579*7836SJohn.Forte@Sun.COM 				" Error: Could not power off the device.\n"
580*7836SJohn.Forte@Sun.COM 				" May be Busy."));
581*7836SJohn.Forte@Sun.COM 			break;
582*7836SJohn.Forte@Sun.COM 
583*7836SJohn.Forte@Sun.COM 		case L_ENCL_NAME_CHANGE_FAIL:
584*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
585*7836SJohn.Forte@Sun.COM 				MSGSTR(10064,
586*7836SJohn.Forte@Sun.COM 				" Error: The Enclosure name change failed."));
587*7836SJohn.Forte@Sun.COM 			break;
588*7836SJohn.Forte@Sun.COM 
589*7836SJohn.Forte@Sun.COM 		case L_DUPLICATE_ENCLOSURES:
590*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
591*7836SJohn.Forte@Sun.COM 				MSGSTR(10065,
592*7836SJohn.Forte@Sun.COM 				" Error: There are two or more enclosures"
593*7836SJohn.Forte@Sun.COM 				" with the same name."
594*7836SJohn.Forte@Sun.COM 				" Please use a logical or physical"
595*7836SJohn.Forte@Sun.COM 				" pathname."));
596*7836SJohn.Forte@Sun.COM 			break;
597*7836SJohn.Forte@Sun.COM 
598*7836SJohn.Forte@Sun.COM 		case L_INVALID_NUM_DISKS_ENCL:
599*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
600*7836SJohn.Forte@Sun.COM 				MSGSTR(10066,
601*7836SJohn.Forte@Sun.COM 				" Error: The number of disks in the"
602*7836SJohn.Forte@Sun.COM 				" front & rear of the enclosure are"
603*7836SJohn.Forte@Sun.COM 				" different."
604*7836SJohn.Forte@Sun.COM 				" This is not a supported configuration."));
605*7836SJohn.Forte@Sun.COM 			break;
606*7836SJohn.Forte@Sun.COM 
607*7836SJohn.Forte@Sun.COM 		case L_ENCL_INVALID_PATH:
608*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
609*7836SJohn.Forte@Sun.COM 				MSGSTR(10067,
610*7836SJohn.Forte@Sun.COM 				" Error: Invalid path."
611*7836SJohn.Forte@Sun.COM 				" Device is not a SENA subsystem."));
612*7836SJohn.Forte@Sun.COM 			break;
613*7836SJohn.Forte@Sun.COM 
614*7836SJohn.Forte@Sun.COM 		case L_NO_ENCL_LIST_FOUND:
615*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
616*7836SJohn.Forte@Sun.COM 				MSGSTR(10068,
617*7836SJohn.Forte@Sun.COM 				" Error: Cannot get the Box list."));
618*7836SJohn.Forte@Sun.COM 			break;
619*7836SJohn.Forte@Sun.COM 
620*7836SJohn.Forte@Sun.COM 		case L_IB_NO_ELEM_FOUND:
621*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
622*7836SJohn.Forte@Sun.COM 				MSGSTR(10069,
623*7836SJohn.Forte@Sun.COM 				" Error: No elements returned from"
624*7836SJohn.Forte@Sun.COM 				" enclosure (IB)."));
625*7836SJohn.Forte@Sun.COM 			break;
626*7836SJohn.Forte@Sun.COM 
627*7836SJohn.Forte@Sun.COM 		case L_GET_STATUS_FAILED:
628*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
629*7836SJohn.Forte@Sun.COM 				MSGSTR(10070,
630*7836SJohn.Forte@Sun.COM 				" Error: Get status failed."));
631*7836SJohn.Forte@Sun.COM 			break;
632*7836SJohn.Forte@Sun.COM 
633*7836SJohn.Forte@Sun.COM 		case L_RD_PG_MIN_BUFF:
634*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
635*7836SJohn.Forte@Sun.COM 				MSGSTR(10071,
636*7836SJohn.Forte@Sun.COM 				" Error: Reading page from IB.\n"
637*7836SJohn.Forte@Sun.COM 				" Buffer size too small."));
638*7836SJohn.Forte@Sun.COM 			break;
639*7836SJohn.Forte@Sun.COM 
640*7836SJohn.Forte@Sun.COM 		case L_RD_PG_INVLD_CODE:
641*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
642*7836SJohn.Forte@Sun.COM 				MSGSTR(10072,
643*7836SJohn.Forte@Sun.COM 				" Error: Reading page from IB\n"
644*7836SJohn.Forte@Sun.COM 				" Invalid page code or page len found."));
645*7836SJohn.Forte@Sun.COM 			break;
646*7836SJohn.Forte@Sun.COM 
647*7836SJohn.Forte@Sun.COM 		case L_BP_BUSY_RESERVED:
648*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
649*7836SJohn.Forte@Sun.COM 				MSGSTR(10073,
650*7836SJohn.Forte@Sun.COM 				" Error: There is a busy or reserved disk"
651*7836SJohn.Forte@Sun.COM 				" attached to this backplane.\n"
652*7836SJohn.Forte@Sun.COM 				" You must close the disk,\n"
653*7836SJohn.Forte@Sun.COM 				" or release the disk,\n"
654*7836SJohn.Forte@Sun.COM 				" or resubmit the command using"
655*7836SJohn.Forte@Sun.COM 				" the Force option."));
656*7836SJohn.Forte@Sun.COM 			break;
657*7836SJohn.Forte@Sun.COM 
658*7836SJohn.Forte@Sun.COM 		case L_BP_BUSY:
659*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
660*7836SJohn.Forte@Sun.COM 				MSGSTR(10074,
661*7836SJohn.Forte@Sun.COM 				" Error: There is a busy disk"
662*7836SJohn.Forte@Sun.COM 				" attached to this backplane.\n"
663*7836SJohn.Forte@Sun.COM 				" You must close the disk,\n"
664*7836SJohn.Forte@Sun.COM 				" or resubmit the command using"
665*7836SJohn.Forte@Sun.COM 				" the Force option."));
666*7836SJohn.Forte@Sun.COM 			break;
667*7836SJohn.Forte@Sun.COM 
668*7836SJohn.Forte@Sun.COM 		case L_BP_RESERVED:
669*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
670*7836SJohn.Forte@Sun.COM 				MSGSTR(10075,
671*7836SJohn.Forte@Sun.COM 				" Error: There is a reserved disk"
672*7836SJohn.Forte@Sun.COM 				" attached to this backplane.\n"
673*7836SJohn.Forte@Sun.COM 				" You must release the disk,\n"
674*7836SJohn.Forte@Sun.COM 				" or resubmit the subcommand using"
675*7836SJohn.Forte@Sun.COM 				" the Force option."));
676*7836SJohn.Forte@Sun.COM 			break;
677*7836SJohn.Forte@Sun.COM 
678*7836SJohn.Forte@Sun.COM 		case L_NO_BP_ELEM_FOUND:
679*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
680*7836SJohn.Forte@Sun.COM 				MSGSTR(10076,
681*7836SJohn.Forte@Sun.COM 				" Error: No Back plane elements found"
682*7836SJohn.Forte@Sun.COM 				" in the enclosure."));
683*7836SJohn.Forte@Sun.COM 			break;
684*7836SJohn.Forte@Sun.COM 
685*7836SJohn.Forte@Sun.COM 		case L_SSA_CONFLICT:
686*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
687*7836SJohn.Forte@Sun.COM 				MSGSTR(10077,
688*7836SJohn.Forte@Sun.COM 				" There is a conflict between the "
689*7836SJohn.Forte@Sun.COM 				"enclosure name and an SSA name of "
690*7836SJohn.Forte@Sun.COM 				"same form, cN.\n"
691*7836SJohn.Forte@Sun.COM 				" Please use a logical or physical "
692*7836SJohn.Forte@Sun.COM 				"pathname."));
693*7836SJohn.Forte@Sun.COM 			break;
694*7836SJohn.Forte@Sun.COM 
695*7836SJohn.Forte@Sun.COM 		case L_WARNING:
696*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
697*7836SJohn.Forte@Sun.COM 				MSGSTR(10078, " Warning:"));
698*7836SJohn.Forte@Sun.COM 
699*7836SJohn.Forte@Sun.COM 			break;
700*7836SJohn.Forte@Sun.COM 
701*7836SJohn.Forte@Sun.COM 		case L_TH_JOIN:
702*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
703*7836SJohn.Forte@Sun.COM 				MSGSTR(10079,
704*7836SJohn.Forte@Sun.COM 				" Error: Thread join failed."));
705*7836SJohn.Forte@Sun.COM 			break;
706*7836SJohn.Forte@Sun.COM 
707*7836SJohn.Forte@Sun.COM 		case L_FCIO_RESET_LINK_FAIL:
708*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
709*7836SJohn.Forte@Sun.COM 				MSGSTR(10082,
710*7836SJohn.Forte@Sun.COM 				" Error: FCIO_RESET_LINK ioctl failed.\n"
711*7836SJohn.Forte@Sun.COM 				" Could not reset the loop."));
712*7836SJohn.Forte@Sun.COM 			break;
713*7836SJohn.Forte@Sun.COM 
714*7836SJohn.Forte@Sun.COM 		case L_FCIO_GET_FCODE_REV_FAIL:
715*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
716*7836SJohn.Forte@Sun.COM 				MSGSTR(10083,
717*7836SJohn.Forte@Sun.COM 				" Error: FCIO_GET_FCODE_REV ioctl failed.\n"
718*7836SJohn.Forte@Sun.COM 				" Could not get the fcode version."));
719*7836SJohn.Forte@Sun.COM 			break;
720*7836SJohn.Forte@Sun.COM 
721*7836SJohn.Forte@Sun.COM 		case L_FCIO_GET_FW_REV_FAIL:
722*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
723*7836SJohn.Forte@Sun.COM 				MSGSTR(10084,
724*7836SJohn.Forte@Sun.COM 				" Error: FCIO_GET_FW_REV ioctl failed.\n"
725*7836SJohn.Forte@Sun.COM 				" Could not get the firmware revision."));
726*7836SJohn.Forte@Sun.COM 			break;
727*7836SJohn.Forte@Sun.COM 
728*7836SJohn.Forte@Sun.COM 		case L_NO_DEVICES_FOUND:
729*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
730*7836SJohn.Forte@Sun.COM 				MSGSTR(10085,
731*7836SJohn.Forte@Sun.COM 				" No FC devices found."));
732*7836SJohn.Forte@Sun.COM 			break;
733*7836SJohn.Forte@Sun.COM 
734*7836SJohn.Forte@Sun.COM 		case L_INVALID_DEVICE_COUNT:
735*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
736*7836SJohn.Forte@Sun.COM 				MSGSTR(10086,
737*7836SJohn.Forte@Sun.COM 				" Error: FCIO_GET_DEV_LIST ioctl returned"
738*7836SJohn.Forte@Sun.COM 				" an invalid device count."));
739*7836SJohn.Forte@Sun.COM 			break;
740*7836SJohn.Forte@Sun.COM 
741*7836SJohn.Forte@Sun.COM 		case L_FCIO_GET_NUM_DEVS_FAIL:
742*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
743*7836SJohn.Forte@Sun.COM 				MSGSTR(10087,
744*7836SJohn.Forte@Sun.COM 				" Error: FCIO_GET_NUM_DEVS ioctl failed.\n"
745*7836SJohn.Forte@Sun.COM 				" Could not get the number of devices."));
746*7836SJohn.Forte@Sun.COM 			break;
747*7836SJohn.Forte@Sun.COM 
748*7836SJohn.Forte@Sun.COM 		case L_FCIO_GET_DEV_LIST_FAIL:
749*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
750*7836SJohn.Forte@Sun.COM 				MSGSTR(10088,
751*7836SJohn.Forte@Sun.COM 				" Error: FCIO_GET_DEV_LIST ioctl failed.\n"
752*7836SJohn.Forte@Sun.COM 				" Could not get the device list."));
753*7836SJohn.Forte@Sun.COM 			break;
754*7836SJohn.Forte@Sun.COM 
755*7836SJohn.Forte@Sun.COM 		case L_FCIO_GET_LINK_STATUS_FAIL:
756*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
757*7836SJohn.Forte@Sun.COM 				MSGSTR(10089,
758*7836SJohn.Forte@Sun.COM 				" Error: FCIO_GET_LINK_STATUS ioctl failed.\n"
759*7836SJohn.Forte@Sun.COM 				" Could not get the link status."));
760*7836SJohn.Forte@Sun.COM 			break;
761*7836SJohn.Forte@Sun.COM 
762*7836SJohn.Forte@Sun.COM 		case L_PORT_OFFLINE_FAIL:
763*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
764*7836SJohn.Forte@Sun.COM 				MSGSTR(10090,
765*7836SJohn.Forte@Sun.COM 				" Error: ioctl to offline the port failed."));
766*7836SJohn.Forte@Sun.COM 			break;
767*7836SJohn.Forte@Sun.COM 
768*7836SJohn.Forte@Sun.COM 		case L_PORT_OFFLINE_UNSUPPORTED:
769*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
770*7836SJohn.Forte@Sun.COM 				MSGSTR(10091,
771*7836SJohn.Forte@Sun.COM 				" Error: The driver does not support ioctl to"
772*7836SJohn.Forte@Sun.COM 				" disable the FCA port."));
773*7836SJohn.Forte@Sun.COM 			break;
774*7836SJohn.Forte@Sun.COM 
775*7836SJohn.Forte@Sun.COM 		case L_PORT_ONLINE_FAIL:
776*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
777*7836SJohn.Forte@Sun.COM 				MSGSTR(10092,
778*7836SJohn.Forte@Sun.COM 				" Error: ioctl to online the port failed."));
779*7836SJohn.Forte@Sun.COM 			break;
780*7836SJohn.Forte@Sun.COM 
781*7836SJohn.Forte@Sun.COM 		case L_PORT_ONLINE_UNSUPPORTED:
782*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
783*7836SJohn.Forte@Sun.COM 				MSGSTR(10093,
784*7836SJohn.Forte@Sun.COM 				" Error: The driver does not support ioctl to"
785*7836SJohn.Forte@Sun.COM 				" enable the FCA port."));
786*7836SJohn.Forte@Sun.COM 			break;
787*7836SJohn.Forte@Sun.COM 
788*7836SJohn.Forte@Sun.COM 		case L_FCP_TGT_INQUIRY_FAIL:
789*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
790*7836SJohn.Forte@Sun.COM 				MSGSTR(10094,
791*7836SJohn.Forte@Sun.COM 				" Error: FCP_TGT_INQUIRY ioctl failed.\n"
792*7836SJohn.Forte@Sun.COM 				" Could not get the target inquiry data"
793*7836SJohn.Forte@Sun.COM 				" from FCP."));
794*7836SJohn.Forte@Sun.COM 			break;
795*7836SJohn.Forte@Sun.COM 
796*7836SJohn.Forte@Sun.COM 		case L_FSTAT_ERROR:
797*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
798*7836SJohn.Forte@Sun.COM 				MSGSTR(10095,
799*7836SJohn.Forte@Sun.COM 				" fstat() error: Cannot obtain status"
800*7836SJohn.Forte@Sun.COM 				" for the device."));
801*7836SJohn.Forte@Sun.COM 			break;
802*7836SJohn.Forte@Sun.COM 
803*7836SJohn.Forte@Sun.COM 		case L_FCIO_GET_HOST_PARAMS_FAIL:
804*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
805*7836SJohn.Forte@Sun.COM 				MSGSTR(10097,
806*7836SJohn.Forte@Sun.COM 				" Error: FCIO_GET_HOST_PARAMS ioctl failed.\n"
807*7836SJohn.Forte@Sun.COM 				" Could not get the host parameters."));
808*7836SJohn.Forte@Sun.COM 			break;
809*7836SJohn.Forte@Sun.COM 
810*7836SJohn.Forte@Sun.COM 		case L_STAT_ERROR:
811*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
812*7836SJohn.Forte@Sun.COM 				MSGSTR(10099,
813*7836SJohn.Forte@Sun.COM 				" stat() error: Cannot obtain status"
814*7836SJohn.Forte@Sun.COM 				" for the device."));
815*7836SJohn.Forte@Sun.COM 			break;
816*7836SJohn.Forte@Sun.COM 
817*7836SJohn.Forte@Sun.COM 		case L_DEV_SNAPSHOT_FAILED:
818*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
819*7836SJohn.Forte@Sun.COM 				MSGSTR(10100,
820*7836SJohn.Forte@Sun.COM 				" Error: Could not retrieve device tree"
821*7836SJohn.Forte@Sun.COM 				" snapshot."));
822*7836SJohn.Forte@Sun.COM 			break;
823*7836SJohn.Forte@Sun.COM 
824*7836SJohn.Forte@Sun.COM 		case L_LOOPBACK_UNSUPPORTED:
825*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
826*7836SJohn.Forte@Sun.COM 				MSGSTR(10101,
827*7836SJohn.Forte@Sun.COM 				" Error: Loopback mode is unsupported for this"
828*7836SJohn.Forte@Sun.COM 				" device."));
829*7836SJohn.Forte@Sun.COM 			break;
830*7836SJohn.Forte@Sun.COM 
831*7836SJohn.Forte@Sun.COM 		case L_LOOPBACK_FAILED:
832*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
833*7836SJohn.Forte@Sun.COM 				MSGSTR(10102,
834*7836SJohn.Forte@Sun.COM 				" Error: Error occurred during loopback mode"
835*7836SJohn.Forte@Sun.COM 				" set."));
836*7836SJohn.Forte@Sun.COM 			break;
837*7836SJohn.Forte@Sun.COM 
838*7836SJohn.Forte@Sun.COM 		case L_FCIO_GET_TOPOLOGY_FAIL:
839*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
840*7836SJohn.Forte@Sun.COM 				MSGSTR(10103,
841*7836SJohn.Forte@Sun.COM 				" Error: FCIO_GET_TOPOLOGY ioctl failed.\n"
842*7836SJohn.Forte@Sun.COM 				" Could not get the fca port topology."));
843*7836SJohn.Forte@Sun.COM 			break;
844*7836SJohn.Forte@Sun.COM 
845*7836SJohn.Forte@Sun.COM 		case L_UNEXPECTED_FC_TOPOLOGY:
846*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
847*7836SJohn.Forte@Sun.COM 				MSGSTR(10104,
848*7836SJohn.Forte@Sun.COM 				" Error: Unexpected Fibre Channel topology"
849*7836SJohn.Forte@Sun.COM 				" found."));
850*7836SJohn.Forte@Sun.COM 			break;
851*7836SJohn.Forte@Sun.COM 
852*7836SJohn.Forte@Sun.COM 		case L_INVALID_PRIVATE_LOOP_ADDRESS:
853*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
854*7836SJohn.Forte@Sun.COM 				MSGSTR(10105,
855*7836SJohn.Forte@Sun.COM 				" Error: AL_PA is not a valid private loop"
856*7836SJohn.Forte@Sun.COM 				" address."));
857*7836SJohn.Forte@Sun.COM 			break;
858*7836SJohn.Forte@Sun.COM 
859*7836SJohn.Forte@Sun.COM 		case L_NO_FABRIC_ADDR_FOUND:
860*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
861*7836SJohn.Forte@Sun.COM 				MSGSTR(10106,
862*7836SJohn.Forte@Sun.COM 				" Error: Could not find the fabric address"
863*7836SJohn.Forte@Sun.COM 				" for the device at physical path."));
864*7836SJohn.Forte@Sun.COM 			break;
865*7836SJohn.Forte@Sun.COM 
866*7836SJohn.Forte@Sun.COM 		case L_INVALID_FABRIC_ADDRESS:
867*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
868*7836SJohn.Forte@Sun.COM 				MSGSTR(10107,
869*7836SJohn.Forte@Sun.COM 				" Error: Device port address on the Fabric"
870*7836SJohn.Forte@Sun.COM 				" topology is not valid."));
871*7836SJohn.Forte@Sun.COM 			break;
872*7836SJohn.Forte@Sun.COM 
873*7836SJohn.Forte@Sun.COM 		case L_PT_PT_FC_TOP_NOT_SUPPORTED:
874*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
875*7836SJohn.Forte@Sun.COM 				MSGSTR(10108,
876*7836SJohn.Forte@Sun.COM 				" Error: Point to Point Fibre Channel "
877*7836SJohn.Forte@Sun.COM 				"topology is currently not supported."));
878*7836SJohn.Forte@Sun.COM 			break;
879*7836SJohn.Forte@Sun.COM 
880*7836SJohn.Forte@Sun.COM 		case L_FCIO_DEV_LOGIN_FAIL:
881*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
882*7836SJohn.Forte@Sun.COM 				MSGSTR(10310,
883*7836SJohn.Forte@Sun.COM 				" Error: FCIO_DEV_LOGIN ioctl failed."));
884*7836SJohn.Forte@Sun.COM 			break;
885*7836SJohn.Forte@Sun.COM 
886*7836SJohn.Forte@Sun.COM 		case L_FCIO_DEV_LOGOUT_FAIL:
887*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
888*7836SJohn.Forte@Sun.COM 				MSGSTR(10311,
889*7836SJohn.Forte@Sun.COM 				" Error: FCIO_DEV_LOGOUT ioctl failed."));
890*7836SJohn.Forte@Sun.COM 			break;
891*7836SJohn.Forte@Sun.COM 
892*7836SJohn.Forte@Sun.COM 		case L_OPNOSUPP_ON_TOPOLOGY:
893*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
894*7836SJohn.Forte@Sun.COM 				MSGSTR(10312,
895*7836SJohn.Forte@Sun.COM 				" Error: operation not supported "
896*7836SJohn.Forte@Sun.COM 				"on connected topology."));
897*7836SJohn.Forte@Sun.COM 			break;
898*7836SJohn.Forte@Sun.COM 
899*7836SJohn.Forte@Sun.COM 		case L_INVALID_PATH_TYPE:
900*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
901*7836SJohn.Forte@Sun.COM 				MSGSTR(10313,
902*7836SJohn.Forte@Sun.COM 				" Error: operation not supported "
903*7836SJohn.Forte@Sun.COM 				"on the path."));
904*7836SJohn.Forte@Sun.COM 			break;
905*7836SJohn.Forte@Sun.COM 
906*7836SJohn.Forte@Sun.COM 		case L_FCIO_GET_STATE_FAIL:
907*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
908*7836SJohn.Forte@Sun.COM 				MSGSTR(10314,
909*7836SJohn.Forte@Sun.COM 				" Error: FCIO_GET_STATE ioctl failed."));
910*7836SJohn.Forte@Sun.COM 			break;
911*7836SJohn.Forte@Sun.COM 
912*7836SJohn.Forte@Sun.COM 		case L_WWN_NOT_FOUND_IN_DEV_LIST:
913*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
914*7836SJohn.Forte@Sun.COM 				MSGSTR(10315,
915*7836SJohn.Forte@Sun.COM 				" Error: device WWN not found in "
916*7836SJohn.Forte@Sun.COM 				"device list."));
917*7836SJohn.Forte@Sun.COM 			break;
918*7836SJohn.Forte@Sun.COM 
919*7836SJohn.Forte@Sun.COM 		case L_STAT_RMT_DIR_ERROR:
920*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
921*7836SJohn.Forte@Sun.COM 				MSGSTR(10110,
922*7836SJohn.Forte@Sun.COM 				" stat() error: Could not get status"
923*7836SJohn.Forte@Sun.COM 				" for /dev/rmt directory."));
924*7836SJohn.Forte@Sun.COM 			break;
925*7836SJohn.Forte@Sun.COM 
926*7836SJohn.Forte@Sun.COM 		case L_STAT_DEV_DIR_ERROR:
927*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
928*7836SJohn.Forte@Sun.COM 				MSGSTR(10111,
929*7836SJohn.Forte@Sun.COM 				" stat() error: Could not get status"
930*7836SJohn.Forte@Sun.COM 				" for /dev/dsk directory."));
931*7836SJohn.Forte@Sun.COM 			break;
932*7836SJohn.Forte@Sun.COM 
933*7836SJohn.Forte@Sun.COM 		case L_PROM_INIT_FAILED:
934*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
935*7836SJohn.Forte@Sun.COM 				MSGSTR(10234,
936*7836SJohn.Forte@Sun.COM 				" Error: di_prom_init failure"));
937*7836SJohn.Forte@Sun.COM 			break;
938*7836SJohn.Forte@Sun.COM 
939*7836SJohn.Forte@Sun.COM 		case L_PORT_DRIVER_NOT_FOUND:
940*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
941*7836SJohn.Forte@Sun.COM 				MSGSTR(10113,
942*7836SJohn.Forte@Sun.COM 				" Error: requested port driver"
943*7836SJohn.Forte@Sun.COM 				" does not exist"));
944*7836SJohn.Forte@Sun.COM 			break;
945*7836SJohn.Forte@Sun.COM 
946*7836SJohn.Forte@Sun.COM 		case L_PHYS_PATH_NOT_FOUND:
947*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
948*7836SJohn.Forte@Sun.COM 				MSGSTR(10114,
949*7836SJohn.Forte@Sun.COM 				" Error: requested phys path does not exist"));
950*7836SJohn.Forte@Sun.COM 			break;
951*7836SJohn.Forte@Sun.COM 
952*7836SJohn.Forte@Sun.COM 		case L_GET_DEV_LIST_ULP_FAILURE:
953*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
954*7836SJohn.Forte@Sun.COM 				MSGSTR(10150,
955*7836SJohn.Forte@Sun.COM 				" Error: g_get_dev_list failed on ULP "
956*7836SJohn.Forte@Sun.COM 				"processing of target device(s)"));
957*7836SJohn.Forte@Sun.COM 			break;
958*7836SJohn.Forte@Sun.COM 
959*7836SJohn.Forte@Sun.COM 		case L_SCSI_VHCI_ERROR:
960*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
961*7836SJohn.Forte@Sun.COM 				MSGSTR(10230,
962*7836SJohn.Forte@Sun.COM 				" Error: Unable to perform failover"));
963*7836SJohn.Forte@Sun.COM 			break;
964*7836SJohn.Forte@Sun.COM 
965*7836SJohn.Forte@Sun.COM 		case L_SCSI_VHCI_ALREADY_ACTIVE:
966*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
967*7836SJohn.Forte@Sun.COM 				MSGSTR(10231,
968*7836SJohn.Forte@Sun.COM 				" Error: Pathclass already active"));
969*7836SJohn.Forte@Sun.COM 			break;
970*7836SJohn.Forte@Sun.COM 
971*7836SJohn.Forte@Sun.COM 		case L_NO_DEVID:
972*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
973*7836SJohn.Forte@Sun.COM 				MSGSTR(10232,
974*7836SJohn.Forte@Sun.COM 				" Error: No device identifier found"));
975*7836SJohn.Forte@Sun.COM 			break;
976*7836SJohn.Forte@Sun.COM 
977*7836SJohn.Forte@Sun.COM 		case L_DRIVER_NOTSUPP:
978*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
979*7836SJohn.Forte@Sun.COM 				MSGSTR(10233,
980*7836SJohn.Forte@Sun.COM 				" Error: Driver not supported"));
981*7836SJohn.Forte@Sun.COM 			break;
982*7836SJohn.Forte@Sun.COM 
983*7836SJohn.Forte@Sun.COM 		case L_PROC_WWN_ARG_ERROR:
984*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
985*7836SJohn.Forte@Sun.COM 				MSGSTR(10235,
986*7836SJohn.Forte@Sun.COM 				" Error: process WWN argument"));
987*7836SJohn.Forte@Sun.COM 			break;
988*7836SJohn.Forte@Sun.COM 
989*7836SJohn.Forte@Sun.COM 		case L_NO_WWN_PROP_FOUND:
990*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
991*7836SJohn.Forte@Sun.COM 				MSGSTR(10236,
992*7836SJohn.Forte@Sun.COM 				" Error: WWN prop not found"));
993*7836SJohn.Forte@Sun.COM 			break;
994*7836SJohn.Forte@Sun.COM 
995*7836SJohn.Forte@Sun.COM 		case L_NO_DRIVER_NODES_FOUND:
996*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
997*7836SJohn.Forte@Sun.COM 				MSGSTR(10237,
998*7836SJohn.Forte@Sun.COM 				" Error: Requested driver nodes not found"));
999*7836SJohn.Forte@Sun.COM 			break;
1000*7836SJohn.Forte@Sun.COM 
1001*7836SJohn.Forte@Sun.COM 		case L_INVALID_MAP_DEV_ADDR:
1002*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
1003*7836SJohn.Forte@Sun.COM 				MSGSTR(10330,
1004*7836SJohn.Forte@Sun.COM 				" Error: Invalid map device handle found"));
1005*7836SJohn.Forte@Sun.COM 			break;
1006*7836SJohn.Forte@Sun.COM 
1007*7836SJohn.Forte@Sun.COM 		case L_INVALID_MAP_DEV_PROP_TYPE:
1008*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
1009*7836SJohn.Forte@Sun.COM 				MSGSTR(10331,
1010*7836SJohn.Forte@Sun.COM 				" Error: Invalid device property type found"));
1011*7836SJohn.Forte@Sun.COM 			break;
1012*7836SJohn.Forte@Sun.COM 
1013*7836SJohn.Forte@Sun.COM 		case L_INVALID_MAP_DEV_PROP_NAME:
1014*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
1015*7836SJohn.Forte@Sun.COM 				MSGSTR(10332,
1016*7836SJohn.Forte@Sun.COM 				" Error: Invalid device property name found"));
1017*7836SJohn.Forte@Sun.COM 			break;
1018*7836SJohn.Forte@Sun.COM 
1019*7836SJohn.Forte@Sun.COM 		case L_INVALID_MAP_DEV_PROP:
1020*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
1021*7836SJohn.Forte@Sun.COM 				MSGSTR(10333,
1022*7836SJohn.Forte@Sun.COM 				" Error: Invalid device property handle "
1023*7836SJohn.Forte@Sun.COM 				"found"));
1024*7836SJohn.Forte@Sun.COM 			break;
1025*7836SJohn.Forte@Sun.COM 
1026*7836SJohn.Forte@Sun.COM 		case L_SCSI_VHCI_NO_STANDBY:
1027*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
1028*7836SJohn.Forte@Sun.COM 				MSGSTR(10334,
1029*7836SJohn.Forte@Sun.COM 				" Error: Unable to perform failover, "
1030*7836SJohn.Forte@Sun.COM 				"standby path unavailable"));
1031*7836SJohn.Forte@Sun.COM 			break;
1032*7836SJohn.Forte@Sun.COM 
1033*7836SJohn.Forte@Sun.COM 		case L_SCSI_VHCI_FAILOVER_NOTSUP:
1034*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
1035*7836SJohn.Forte@Sun.COM 				MSGSTR(10335,
1036*7836SJohn.Forte@Sun.COM 				" Error: Device does not support failover"));
1037*7836SJohn.Forte@Sun.COM 			break;
1038*7836SJohn.Forte@Sun.COM 
1039*7836SJohn.Forte@Sun.COM 		case L_SCSI_VHCI_FAILOVER_BUSY:
1040*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
1041*7836SJohn.Forte@Sun.COM 				MSGSTR(10336,
1042*7836SJohn.Forte@Sun.COM 				" Error: Failover currently in progress"));
1043*7836SJohn.Forte@Sun.COM 			break;
1044*7836SJohn.Forte@Sun.COM 
1045*7836SJohn.Forte@Sun.COM 		case L_NO_SUCH_DEV_FOUND:
1046*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
1047*7836SJohn.Forte@Sun.COM 				MSGSTR(10337,
1048*7836SJohn.Forte@Sun.COM 				" Error: No such device found"));
1049*7836SJohn.Forte@Sun.COM 			break;
1050*7836SJohn.Forte@Sun.COM 
1051*7836SJohn.Forte@Sun.COM 		case L_NO_SUCH_PROP_FOUND:
1052*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
1053*7836SJohn.Forte@Sun.COM 				MSGSTR(10338,
1054*7836SJohn.Forte@Sun.COM 				" Error: No such property found"));
1055*7836SJohn.Forte@Sun.COM 			break;
1056*7836SJohn.Forte@Sun.COM 
1057*7836SJohn.Forte@Sun.COM 		case L_INVALID_ARG:
1058*7836SJohn.Forte@Sun.COM 			(void) sprintf(err_msg,
1059*7836SJohn.Forte@Sun.COM 				MSGSTR(10339,
1060*7836SJohn.Forte@Sun.COM 				" Error: Invalid argument found"));
1061*7836SJohn.Forte@Sun.COM 			break;
1062*7836SJohn.Forte@Sun.COM 
1063*7836SJohn.Forte@Sun.COM 		default:
1064*7836SJohn.Forte@Sun.COM 
1065*7836SJohn.Forte@Sun.COM 			if (((L_SCSI_ERROR ^ errornum) == STATUS_GOOD) ||
1066*7836SJohn.Forte@Sun.COM 			((L_SCSI_ERROR ^ errornum) == STATUS_BUSY) ||
1067*7836SJohn.Forte@Sun.COM 			((L_SCSI_ERROR ^ errornum) == STATUS_CHECK) ||
1068*7836SJohn.Forte@Sun.COM 			((L_SCSI_ERROR ^ errornum) == STATUS_MET) ||
1069*7836SJohn.Forte@Sun.COM 			((L_SCSI_ERROR ^ errornum) == STATUS_INTERMEDIATE) ||
1070*7836SJohn.Forte@Sun.COM 		((L_SCSI_ERROR ^ errornum) == STATUS_INTERMEDIATE_MET) ||
1071*7836SJohn.Forte@Sun.COM 		((L_SCSI_ERROR ^ errornum) == STATUS_RESERVATION_CONFLICT) ||
1072*7836SJohn.Forte@Sun.COM 			((L_SCSI_ERROR ^ errornum) == STATUS_TERMINATED) ||
1073*7836SJohn.Forte@Sun.COM 			((L_SCSI_ERROR ^ errornum) == STATUS_QFULL)) {
1074*7836SJohn.Forte@Sun.COM 				(void) sprintf(err_msg,
1075*7836SJohn.Forte@Sun.COM 					MSGSTR(10080,
1076*7836SJohn.Forte@Sun.COM 					" SCSI Error - Sense Byte:(0x%x) %s \n"
1077*7836SJohn.Forte@Sun.COM 					" Error: Retry failed."),
1078*7836SJohn.Forte@Sun.COM 				(L_SCSI_ERROR ^ errornum) & STATUS_MASK,
1079*7836SJohn.Forte@Sun.COM 			decode_sense_byte((uchar_t)L_SCSI_ERROR ^ errornum));
1080*7836SJohn.Forte@Sun.COM 			} else {
1081*7836SJohn.Forte@Sun.COM 				(void) sprintf(err_msg,
1082*7836SJohn.Forte@Sun.COM 					MSGSTR(10081,
1083*7836SJohn.Forte@Sun.COM 					" Error: could not decode the"
1084*7836SJohn.Forte@Sun.COM 					" error message.\n"
1085*7836SJohn.Forte@Sun.COM 					" The given error message is not"
1086*7836SJohn.Forte@Sun.COM 					" defined in the library.\n"
1087*7836SJohn.Forte@Sun.COM 					" Message number: %d.\n"), errornum);
1088*7836SJohn.Forte@Sun.COM 			}
1089*7836SJohn.Forte@Sun.COM 
1090*7836SJohn.Forte@Sun.COM 	} /* end of switch */
1091*7836SJohn.Forte@Sun.COM 
1092*7836SJohn.Forte@Sun.COM 	errStrg = g_alloc_string(err_msg);
1093*7836SJohn.Forte@Sun.COM 
1094*7836SJohn.Forte@Sun.COM 	return (errStrg);
1095*7836SJohn.Forte@Sun.COM }
1096