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