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