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