2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A
2N/A/*LINTLIBRARY*/
2N/A
2N/A/*
2N/A * This module provides error messages to the
2N/A * a5k and g_fc libraries.
2N/A */
2N/A
2N/A/*
2N/A * I18N message number ranges
2N/A * This file: 10000 - 10499
2N/A * Shared common messages: 1 - 1999
2N/A */
2N/A
2N/A/* #define _POSIX_SOURCE 1 */
2N/A
2N/A
2N/A/* Includes */
2N/A#include <stdlib.h>
2N/A#include <stdio.h>
2N/A#include <fcntl.h>
2N/A#include <nl_types.h>
2N/A#include <sys/scsi/scsi.h>
2N/A#include <stgcom.h>
2N/A#include <l_error.h> /* error msg defines. */
2N/A#include <l_common.h> /* I18N message define */
2N/A#include <g_state.h>
2N/A
2N/A#include <string.h> /* For strerror */
2N/A#include <errno.h>
2N/A
2N/A
2N/A/* Defines */
2N/A#define MAXLEN 1000
2N/A
2N/A
2N/A
2N/A/*
2N/A * Decodes the SCSI sense byte to a string.
2N/A *
2N/A * RETURNS:
2N/A * character string
2N/A */
2N/Astatic char *
2N/Adecode_sense_byte(uchar_t status)
2N/A{
2N/A switch (status & STATUS_MASK) {
2N/A case STATUS_GOOD:
2N/A return (MSGSTR(10000, "Good status"));
2N/A
2N/A case STATUS_CHECK:
2N/A return (MSGSTR(128, "Check condition"));
2N/A
2N/A case STATUS_MET:
2N/A return (MSGSTR(124, "Condition met"));
2N/A
2N/A case STATUS_BUSY:
2N/A return (MSGSTR(37, "Busy"));
2N/A
2N/A case STATUS_INTERMEDIATE:
2N/A return (MSGSTR(10001, "Intermediate"));
2N/A
2N/A case STATUS_INTERMEDIATE_MET:
2N/A return (MSGSTR(10002, "Intermediate - condition met"));
2N/A
2N/A case STATUS_RESERVATION_CONFLICT:
2N/A return (MSGSTR(10003, "Reservation_conflict"));
2N/A
2N/A case STATUS_TERMINATED:
2N/A return (MSGSTR(126, "Command terminated"));
2N/A
2N/A case STATUS_QFULL:
2N/A return (MSGSTR(83, "Queue full"));
2N/A
2N/A default:
2N/A return (MSGSTR(4, "Unknown status"));
2N/A }
2N/A}
2N/A
2N/A
2N/A/*
2N/A * This function finds a predefined error string to a given
2N/A * error number (errornum), allocates memory for the string
2N/A * and returns the corresponding error message to the caller.
2N/A *
2N/A * RETURNS
2N/A * error string if O.K.
2N/A * NULL otherwise
2N/A */
2N/Achar
2N/A*g_get_errString(int errornum)
2N/A{
2N/Achar err_msg[MAXLEN], *errStrg;
2N/A
2N/A err_msg[0] = '\0'; /* Just in case */
2N/A if (errornum < L_BASE) {
2N/A /* Some sort of random system error most likely */
2N/A errStrg = strerror(errno);
2N/A if (errStrg != NULL) {
2N/A (void) strcpy(err_msg, errStrg);
2N/A } else { /* Something's _really_ messed up */
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10081,
2N/A " Error: could not decode the"
2N/A " error message.\n"
2N/A " The given error message is not"
2N/A " defined in the library.\n"
2N/A " Message number: %d.\n"), errornum);
2N/A }
2N/A
2N/A /* Make sure ALL CASES set err_msg to something */
2N/A } else switch (errornum) {
2N/A case L_SCSI_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10096,
2N/A " Error: SCSI failure."));
2N/A break;
2N/A
2N/A case L_PR_INVLD_TRNSFR_LEN:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10005,
2N/A " Error: Persistant Reserve command"
2N/A " transfer length not word aligned."));
2N/A break;
2N/A
2N/A case L_RD_NO_DISK_ELEM:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10006,
2N/A " Error: Could not find the disk elements"
2N/A " in the Receive Diagnostic pages."));
2N/A break;
2N/A
2N/A case L_RD_INVLD_TRNSFR_LEN:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10007,
2N/A " Error: Receive Diagnostic command"
2N/A " transfer length not word aligned."));
2N/A break;
2N/A
2N/A case L_ILLEGAL_MODE_SENSE_PAGE:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10008,
2N/A " Error: Programming error - "
2N/A "illegal Mode Sense parameter."));
2N/A break;
2N/A
2N/A case L_INVALID_NO_OF_ENVSEN_PAGES:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10009,
2N/A " Error: Invalid no. of sense pages.\n"
2N/A " Could not get valid sense page"
2N/A " information from the device."));
2N/A break;
2N/A
2N/A case L_INVALID_BUF_LEN:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10010,
2N/A " Error: Invalid buffer length.\n"
2N/A " Could not get diagnostic "
2N/A " information from the device."));
2N/A break;
2N/A
2N/A case L_INVALID_PATH:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(113,
2N/A " Error: Invalid pathname"));
2N/A break;
2N/A
2N/A case L_NO_PHYS_PATH:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10011,
2N/A " Error: Could not get"
2N/A " physical path to the device."));
2N/A break;
2N/A
2N/A case L_NO_SES_PATH:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10098,
2N/A " Error: No SES found"
2N/A " for the device path."));
2N/A break;
2N/A
2N/A case L_INVLD_PATH_NO_SLASH_FND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10012,
2N/A "Error in the device physical path."));
2N/A break;
2N/A
2N/A case L_INVLD_PATH_NO_ATSIGN_FND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10013,
2N/A " Error in the device physical path:"
2N/A " no @ found."));
2N/A break;
2N/A
2N/A case L_INVALID_SLOT:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10014,
2N/A " Error: Invalid path format."
2N/A " Invalid slot."));
2N/A break;
2N/A
2N/A case L_INVALID_LED_RQST:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10015,
2N/A " Error: Invalid LED request."));
2N/A break;
2N/A
2N/A case L_INVALID_PATH_FORMAT:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10016,
2N/A " Error: Invalid path format."));
2N/A break;
2N/A
2N/A case L_OPEN_PATH_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10017,
2N/A " Error opening the path."));
2N/A break;
2N/A
2N/A case L_INVALID_PASSWORD_LEN:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10018,
2N/A "Error: Invalid password length."));
2N/A break;
2N/A
2N/A case L_INVLD_PHYS_PATH_TO_DISK:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10019,
2N/A " Error: Physical path not of a disk."));
2N/A break;
2N/A
2N/A case L_INVLD_ID_FOUND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10020,
2N/A " Error in the device physical path:"
2N/A " Invalid ID found in the path."));
2N/A break;
2N/A
2N/A case L_INVLD_WWN_FORMAT:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10021,
2N/A " Error in the device physical path:"
2N/A " Invalid wwn format."));
2N/A
2N/A break;
2N/A
2N/A case L_NO_VALID_PATH:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10022,
2N/A " Error: Could not find valid path to"
2N/A " the device."));
2N/A break;
2N/A
2N/A case L_NO_WWN_FOUND_IN_PATH:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10023,
2N/A " Error in the device physical path:"
2N/A " No WWN found."));
2N/A
2N/A break;
2N/A
2N/A case L_NO_NODE_WWN_IN_WWNLIST:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10024,
2N/A " Error: Device's Node WWN is not"
2N/A " found in the WWN list.\n"));
2N/A break;
2N/A
2N/A case L_NO_NODE_WWN_IN_BOXLIST:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10025,
2N/A " Error: Device's Node WWN is not"
2N/A " found in the Box list.\n"));
2N/A break;
2N/A
2N/A case L_NULL_WWN_LIST:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10026,
2N/A " Error: Null WWN list found."));
2N/A break;
2N/A
2N/A case L_NO_LOOP_ADDRS_FOUND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10027,
2N/A " Error: Could not find the loop address for "
2N/A " the device at physical path."));
2N/A
2N/A break;
2N/A
2N/A case L_INVLD_PORT_IN_PATH:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10028,
2N/A "Error in the device physical path:"
2N/A " Invalid port number found."
2N/A " (Should be 0 or 1)."));
2N/A
2N/A break;
2N/A
2N/A case L_INVALID_LOOP_MAP:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10029,
2N/A "Error: Invalid loop map found."));
2N/A break;
2N/A
2N/A case L_SFIOCGMAP_IOCTL_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10030,
2N/A " Error: SFIOCGMAP ioctl failed."
2N/A " Cannot read loop map."));
2N/A break;
2N/A
2N/A case L_FCIO_GETMAP_IOCTL_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10031,
2N/A " Error: FCIO_GETMAP ioctl failed."
2N/A " Cannot read loop map."));
2N/A break;
2N/A
2N/A case L_FCIO_LINKSTATUS_FAILED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10032,
2N/A " Error: FCIO_LINKSTATUS ioctl failed."
2N/A " Cannot read loop map."));
2N/A break;
2N/A
2N/A case L_FCIOGETMAP_INVLD_LEN:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10033,
2N/A " Error: FCIO_GETMAP ioctl returned"
2N/A " an invalid parameter:"
2N/A " # entries to large."));
2N/A break;
2N/A
2N/A case L_FCIO_FORCE_LIP_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10034,
2N/A " Error: FCIO_FORCE_LIP ioctl failed."));
2N/A break;
2N/A
2N/A case L_FCIO_FORCE_LIP_PARTIAL_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10115,
2N/A " Error: FCIO_FORCE_LIP ioctl failed on one"
2N/A " or more (but not all) of the paths."));
2N/A break;
2N/A
2N/A case L_DWNLD_CHKSUM_FAILED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10035,
2N/A "Error: Download file checksum failed."));
2N/A
2N/A break;
2N/A
2N/A case L_DWNLD_READ_HEADER_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10036,
2N/A " Error: Reading download file exec"
2N/A " header failed."));
2N/A break;
2N/A
2N/A case L_DWNLD_READ_INCORRECT_BYTES:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10037,
2N/A " Error: Incorrect number of bytes read."));
2N/A break;
2N/A
2N/A case L_DWNLD_INVALID_TEXT_SIZE:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10038,
2N/A " Error: Reading text segment: "
2N/A " Found wrong size."));
2N/A break;
2N/A
2N/A case L_DWNLD_READ_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10039,
2N/A " Error: Failed to read download file."));
2N/A break;
2N/A
2N/A case L_DWNLD_BAD_FRMWARE:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10040,
2N/A " Error: Bad Firmware MAGIC."));
2N/A break;
2N/A
2N/A case L_DWNLD_TIMED_OUT:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10041,
2N/A " Error: Timed out in 5 minutes"
2N/A " waiting for the"
2N/A " IB to become available."));
2N/A break;
2N/A
2N/A case L_REC_DIAG_PG1:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10042,
2N/A " Error parsing the Receive"
2N/A " diagnostic page."));
2N/A break;
2N/A
2N/A case L_TRANSFER_LEN:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10043, " "));
2N/A break;
2N/A
2N/A case L_REQUIRE_FILE:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10109,
2N/A " Error: No default file. You must specify"
2N/A " the filename path."));
2N/A break;
2N/A
2N/A case L_MALLOC_FAILED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10,
2N/A " Error: Unable to allocate memory."));
2N/A break;
2N/A
2N/A case L_LOCALTIME_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10044,
2N/A " Error: Could not convert time"
2N/A " to broken-down time: Hrs/Mins/Secs."));
2N/A break;
2N/A
2N/A case L_SELECT_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10045,
2N/A " select() error during retry:"
2N/A " Could not wait for"
2N/A " specified time."));
2N/A break;
2N/A
2N/A case L_NO_DISK_DEV_FOUND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10046,
2N/A " Error: No disk devices found"
2N/A " in the /dev/rdsk"
2N/A " directory."));
2N/A break;
2N/A
2N/A case L_NO_TAPE_DEV_FOUND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10047,
2N/A " Error: No tape devices found"
2N/A " in the /dev/rmt"
2N/A " directory."));
2N/A break;
2N/A
2N/A case L_LSTAT_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10048,
2N/A " lstat() error: Cannot obtain status"
2N/A " for the device."));
2N/A break;
2N/A
2N/A case L_SYMLINK_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10049,
2N/A " Error: Could not read the symbolic link."));
2N/A break;
2N/A
2N/A case L_UNAME_FAILED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10050,
2N/A " uname() error: Could not obtain the"
2N/A " architeture of the host machine."));
2N/A break;
2N/A
2N/A case L_DRVCONFIG_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10051,
2N/A " Error: Could not run drvconfig."));
2N/A break;
2N/A
2N/A case L_DISKS_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10052,
2N/A " Error: Could not run disks."));
2N/A break;
2N/A
2N/A case L_DEVLINKS_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10053,
2N/A " Error: Could not run devlinks."));
2N/A break;
2N/A
2N/A case L_READ_DEV_DIR_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10054,
2N/A " Error: Could not read /dev/rdsk"
2N/A " directory."));
2N/A break;
2N/A
2N/A case L_OPEN_ES_DIR_FAILED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10055,
2N/A " Error: Could not open /dev/es"
2N/A " directory."));
2N/A break;
2N/A
2N/A case L_LSTAT_ES_DIR_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10056,
2N/A " lstat() error: Could not get status"
2N/A " for /dev/es directory."));
2N/A break;
2N/A
2N/A case L_DEV_BUSY:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10057,
2N/A " Error: Could not offline the device\n"
2N/A " May be Busy."));
2N/A break;
2N/A
2N/A case L_EXCL_OPEN_FAILED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10058,
2N/A " Error: Could not open device in"
2N/A " exclusive mode."
2N/A " May already be open."));
2N/A break;
2N/A
2N/A case L_DEVICE_RESERVED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10059,
2N/A " Error: Disk is reserved."));
2N/A break;
2N/A
2N/A case L_DISKS_RESERVED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10060,
2N/A " Error: One or more disks in"
2N/A " SENA are reserved."));
2N/A break;
2N/A
2N/A case L_SLOT_EMPTY:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10061,
2N/A " Error: Slot is empty."));
2N/A break;
2N/A
2N/A case L_ACQUIRE_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10062,
2N/A " Error: Could not acquire"
2N/A " the device."));
2N/A break;
2N/A
2N/A case L_POWER_OFF_FAIL_BUSY:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10063,
2N/A " Error: Could not power off the device.\n"
2N/A " May be Busy."));
2N/A break;
2N/A
2N/A case L_ENCL_NAME_CHANGE_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10064,
2N/A " Error: The Enclosure name change failed."));
2N/A break;
2N/A
2N/A case L_DUPLICATE_ENCLOSURES:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10065,
2N/A " Error: There are two or more enclosures"
2N/A " with the same name."
2N/A " Please use a logical or physical"
2N/A " pathname."));
2N/A break;
2N/A
2N/A case L_INVALID_NUM_DISKS_ENCL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10066,
2N/A " Error: The number of disks in the"
2N/A " front & rear of the enclosure are"
2N/A " different."
2N/A " This is not a supported configuration."));
2N/A break;
2N/A
2N/A case L_ENCL_INVALID_PATH:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10067,
2N/A " Error: Invalid path."
2N/A " Device is not a SENA subsystem."));
2N/A break;
2N/A
2N/A case L_NO_ENCL_LIST_FOUND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10068,
2N/A " Error: Cannot get the Box list."));
2N/A break;
2N/A
2N/A case L_IB_NO_ELEM_FOUND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10069,
2N/A " Error: No elements returned from"
2N/A " enclosure (IB)."));
2N/A break;
2N/A
2N/A case L_GET_STATUS_FAILED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10070,
2N/A " Error: Get status failed."));
2N/A break;
2N/A
2N/A case L_RD_PG_MIN_BUFF:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10071,
2N/A " Error: Reading page from IB.\n"
2N/A " Buffer size too small."));
2N/A break;
2N/A
2N/A case L_RD_PG_INVLD_CODE:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10072,
2N/A " Error: Reading page from IB\n"
2N/A " Invalid page code or page len found."));
2N/A break;
2N/A
2N/A case L_BP_BUSY_RESERVED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10073,
2N/A " Error: There is a busy or reserved disk"
2N/A " attached to this backplane.\n"
2N/A " You must close the disk,\n"
2N/A " or release the disk,\n"
2N/A " or resubmit the command using"
2N/A " the Force option."));
2N/A break;
2N/A
2N/A case L_BP_BUSY:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10074,
2N/A " Error: There is a busy disk"
2N/A " attached to this backplane.\n"
2N/A " You must close the disk,\n"
2N/A " or resubmit the command using"
2N/A " the Force option."));
2N/A break;
2N/A
2N/A case L_BP_RESERVED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10075,
2N/A " Error: There is a reserved disk"
2N/A " attached to this backplane.\n"
2N/A " You must release the disk,\n"
2N/A " or resubmit the subcommand using"
2N/A " the Force option."));
2N/A break;
2N/A
2N/A case L_NO_BP_ELEM_FOUND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10076,
2N/A " Error: No Back plane elements found"
2N/A " in the enclosure."));
2N/A break;
2N/A
2N/A case L_SSA_CONFLICT:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10077,
2N/A " There is a conflict between the "
2N/A "enclosure name and an SSA name of "
2N/A "same form, cN.\n"
2N/A " Please use a logical or physical "
2N/A "pathname."));
2N/A break;
2N/A
2N/A case L_WARNING:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10078, " Warning:"));
2N/A
2N/A break;
2N/A
2N/A case L_TH_JOIN:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10079,
2N/A " Error: Thread join failed."));
2N/A break;
2N/A
2N/A case L_FCIO_RESET_LINK_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10082,
2N/A " Error: FCIO_RESET_LINK ioctl failed.\n"
2N/A " Could not reset the loop."));
2N/A break;
2N/A
2N/A case L_FCIO_GET_FCODE_REV_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10083,
2N/A " Error: FCIO_GET_FCODE_REV ioctl failed.\n"
2N/A " Could not get the fcode version."));
2N/A break;
2N/A
2N/A case L_FCIO_GET_FW_REV_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10084,
2N/A " Error: FCIO_GET_FW_REV ioctl failed.\n"
2N/A " Could not get the firmware revision."));
2N/A break;
2N/A
2N/A case L_NO_DEVICES_FOUND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10085,
2N/A " No FC devices found."));
2N/A break;
2N/A
2N/A case L_INVALID_DEVICE_COUNT:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10086,
2N/A " Error: FCIO_GET_DEV_LIST ioctl returned"
2N/A " an invalid device count."));
2N/A break;
2N/A
2N/A case L_FCIO_GET_NUM_DEVS_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10087,
2N/A " Error: FCIO_GET_NUM_DEVS ioctl failed.\n"
2N/A " Could not get the number of devices."));
2N/A break;
2N/A
2N/A case L_FCIO_GET_DEV_LIST_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10088,
2N/A " Error: FCIO_GET_DEV_LIST ioctl failed.\n"
2N/A " Could not get the device list."));
2N/A break;
2N/A
2N/A case L_FCIO_GET_LINK_STATUS_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10089,
2N/A " Error: FCIO_GET_LINK_STATUS ioctl failed.\n"
2N/A " Could not get the link status."));
2N/A break;
2N/A
2N/A case L_PORT_OFFLINE_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10090,
2N/A " Error: ioctl to offline the port failed."));
2N/A break;
2N/A
2N/A case L_PORT_OFFLINE_UNSUPPORTED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10091,
2N/A " Error: The driver does not support ioctl to"
2N/A " disable the FCA port."));
2N/A break;
2N/A
2N/A case L_PORT_ONLINE_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10092,
2N/A " Error: ioctl to online the port failed."));
2N/A break;
2N/A
2N/A case L_PORT_ONLINE_UNSUPPORTED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10093,
2N/A " Error: The driver does not support ioctl to"
2N/A " enable the FCA port."));
2N/A break;
2N/A
2N/A case L_FCP_TGT_INQUIRY_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10094,
2N/A " Error: FCP_TGT_INQUIRY ioctl failed.\n"
2N/A " Could not get the target inquiry data"
2N/A " from FCP."));
2N/A break;
2N/A
2N/A case L_FSTAT_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10095,
2N/A " fstat() error: Cannot obtain status"
2N/A " for the device."));
2N/A break;
2N/A
2N/A case L_FCIO_GET_HOST_PARAMS_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10097,
2N/A " Error: FCIO_GET_HOST_PARAMS ioctl failed.\n"
2N/A " Could not get the host parameters."));
2N/A break;
2N/A
2N/A case L_STAT_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10099,
2N/A " stat() error: Cannot obtain status"
2N/A " for the device."));
2N/A break;
2N/A
2N/A case L_DEV_SNAPSHOT_FAILED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10100,
2N/A " Error: Could not retrieve device tree"
2N/A " snapshot."));
2N/A break;
2N/A
2N/A case L_LOOPBACK_UNSUPPORTED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10101,
2N/A " Error: Loopback mode is unsupported for this"
2N/A " device."));
2N/A break;
2N/A
2N/A case L_LOOPBACK_FAILED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10102,
2N/A " Error: Error occurred during loopback mode"
2N/A " set."));
2N/A break;
2N/A
2N/A case L_FCIO_GET_TOPOLOGY_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10103,
2N/A " Error: FCIO_GET_TOPOLOGY ioctl failed.\n"
2N/A " Could not get the fca port topology."));
2N/A break;
2N/A
2N/A case L_UNEXPECTED_FC_TOPOLOGY:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10104,
2N/A " Error: Unexpected Fibre Channel topology"
2N/A " found."));
2N/A break;
2N/A
2N/A case L_INVALID_PRIVATE_LOOP_ADDRESS:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10105,
2N/A " Error: AL_PA is not a valid private loop"
2N/A " address."));
2N/A break;
2N/A
2N/A case L_NO_FABRIC_ADDR_FOUND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10106,
2N/A " Error: Could not find the fabric address"
2N/A " for the device at physical path."));
2N/A break;
2N/A
2N/A case L_INVALID_FABRIC_ADDRESS:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10107,
2N/A " Error: Device port address on the Fabric"
2N/A " topology is not valid."));
2N/A break;
2N/A
2N/A case L_PT_PT_FC_TOP_NOT_SUPPORTED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10108,
2N/A " Error: Point to Point Fibre Channel "
2N/A "topology is currently not supported."));
2N/A break;
2N/A
2N/A case L_FCIO_DEV_LOGIN_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10310,
2N/A " Error: FCIO_DEV_LOGIN ioctl failed."));
2N/A break;
2N/A
2N/A case L_FCIO_DEV_LOGOUT_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10311,
2N/A " Error: FCIO_DEV_LOGOUT ioctl failed."));
2N/A break;
2N/A
2N/A case L_OPNOSUPP_ON_TOPOLOGY:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10312,
2N/A " Error: operation not supported "
2N/A "on connected topology."));
2N/A break;
2N/A
2N/A case L_INVALID_PATH_TYPE:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10313,
2N/A " Error: operation not supported "
2N/A "on the path."));
2N/A break;
2N/A
2N/A case L_FCIO_GET_STATE_FAIL:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10314,
2N/A " Error: FCIO_GET_STATE ioctl failed."));
2N/A break;
2N/A
2N/A case L_WWN_NOT_FOUND_IN_DEV_LIST:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10315,
2N/A " Error: device WWN not found in "
2N/A "device list."));
2N/A break;
2N/A
2N/A case L_STAT_RMT_DIR_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10110,
2N/A " stat() error: Could not get status"
2N/A " for /dev/rmt directory."));
2N/A break;
2N/A
2N/A case L_STAT_DEV_DIR_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10111,
2N/A " stat() error: Could not get status"
2N/A " for /dev/dsk directory."));
2N/A break;
2N/A
2N/A case L_PROM_INIT_FAILED:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10234,
2N/A " Error: di_prom_init failure"));
2N/A break;
2N/A
2N/A case L_PORT_DRIVER_NOT_FOUND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10113,
2N/A " Error: requested port driver"
2N/A " does not exist"));
2N/A break;
2N/A
2N/A case L_PHYS_PATH_NOT_FOUND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10114,
2N/A " Error: requested phys path does not exist"));
2N/A break;
2N/A
2N/A case L_GET_DEV_LIST_ULP_FAILURE:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10150,
2N/A " Error: g_get_dev_list failed on ULP "
2N/A "processing of target device(s)"));
2N/A break;
2N/A
2N/A case L_SCSI_VHCI_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10230,
2N/A " Error: Unable to perform failover"));
2N/A break;
2N/A
2N/A case L_SCSI_VHCI_ALREADY_ACTIVE:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10231,
2N/A " Error: Pathclass already active"));
2N/A break;
2N/A
2N/A case L_NO_DEVID:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10232,
2N/A " Error: No device identifier found"));
2N/A break;
2N/A
2N/A case L_DRIVER_NOTSUPP:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10233,
2N/A " Error: Driver not supported"));
2N/A break;
2N/A
2N/A case L_PROC_WWN_ARG_ERROR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10235,
2N/A " Error: process WWN argument"));
2N/A break;
2N/A
2N/A case L_NO_WWN_PROP_FOUND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10236,
2N/A " Error: WWN prop not found"));
2N/A break;
2N/A
2N/A case L_NO_DRIVER_NODES_FOUND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10237,
2N/A " Error: Requested driver nodes not found"));
2N/A break;
2N/A
2N/A case L_INVALID_MAP_DEV_ADDR:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10330,
2N/A " Error: Invalid map device handle found"));
2N/A break;
2N/A
2N/A case L_INVALID_MAP_DEV_PROP_TYPE:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10331,
2N/A " Error: Invalid device property type found"));
2N/A break;
2N/A
2N/A case L_INVALID_MAP_DEV_PROP_NAME:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10332,
2N/A " Error: Invalid device property name found"));
2N/A break;
2N/A
2N/A case L_INVALID_MAP_DEV_PROP:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10333,
2N/A " Error: Invalid device property handle "
2N/A "found"));
2N/A break;
2N/A
2N/A case L_SCSI_VHCI_NO_STANDBY:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10334,
2N/A " Error: Unable to perform failover, "
2N/A "standby path unavailable"));
2N/A break;
2N/A
2N/A case L_SCSI_VHCI_FAILOVER_NOTSUP:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10335,
2N/A " Error: Device does not support failover"));
2N/A break;
2N/A
2N/A case L_SCSI_VHCI_FAILOVER_BUSY:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10336,
2N/A " Error: Failover currently in progress"));
2N/A break;
2N/A
2N/A case L_NO_SUCH_DEV_FOUND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10337,
2N/A " Error: No such device found"));
2N/A break;
2N/A
2N/A case L_NO_SUCH_PROP_FOUND:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10338,
2N/A " Error: No such property found"));
2N/A break;
2N/A
2N/A case L_INVALID_ARG:
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10339,
2N/A " Error: Invalid argument found"));
2N/A break;
2N/A
2N/A default:
2N/A
2N/A if (((L_SCSI_ERROR ^ errornum) == STATUS_GOOD) ||
2N/A ((L_SCSI_ERROR ^ errornum) == STATUS_BUSY) ||
2N/A ((L_SCSI_ERROR ^ errornum) == STATUS_CHECK) ||
2N/A ((L_SCSI_ERROR ^ errornum) == STATUS_MET) ||
2N/A ((L_SCSI_ERROR ^ errornum) == STATUS_INTERMEDIATE) ||
2N/A ((L_SCSI_ERROR ^ errornum) == STATUS_INTERMEDIATE_MET) ||
2N/A ((L_SCSI_ERROR ^ errornum) == STATUS_RESERVATION_CONFLICT) ||
2N/A ((L_SCSI_ERROR ^ errornum) == STATUS_TERMINATED) ||
2N/A ((L_SCSI_ERROR ^ errornum) == STATUS_QFULL)) {
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10080,
2N/A " SCSI Error - Sense Byte:(0x%x) %s \n"
2N/A " Error: Retry failed."),
2N/A (L_SCSI_ERROR ^ errornum) & STATUS_MASK,
2N/A decode_sense_byte((uchar_t)L_SCSI_ERROR ^ errornum));
2N/A } else {
2N/A (void) sprintf(err_msg,
2N/A MSGSTR(10081,
2N/A " Error: could not decode the"
2N/A " error message.\n"
2N/A " The given error message is not"
2N/A " defined in the library.\n"
2N/A " Message number: %d.\n"), errornum);
2N/A }
2N/A
2N/A } /* end of switch */
2N/A
2N/A errStrg = g_alloc_string(err_msg);
2N/A
2N/A return (errStrg);
2N/A}