main.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "main.h"
/*
* MDB module linkage information:
*/
static const mdb_dcmd_t dcmds[] = {
{ "vhci_states", "[ -v ]", "dump all the vhci state pointers",
vhci_states },
"and detailed pi_prop list", mdipi },
mdiprops },
"list all paths", mdiphci },
"all phcis", mdivhci },
"client links", mdiclient_paths },
"phci links", mdiphci_paths },
mdiphcis },
vhciguid },
{ NULL }
};
static const mdb_walker_t walkers[] = {
{ "mdipi_client_list", "Walker for mdi_pathinfo pi_client_link",
{ "mdipi_phci_list", "Walker for mdi_pathinfo pi_phci_link",
{ "mdiphci_list", "Walker for mdi_phci ph_next link",
{ NULL }
};
static const mdb_modinfo_t modinfo = {
};
const mdb_modinfo_t *
_mdb_init(void)
{
return (&modinfo);
}
char *client_lb_str[] =
{
"NONE",
"RR",
"LBA",
};
char *mdi_client_states[] =
{
NULL,
"OPTIMAL",
"DEGRADED",
"FAILED",
};
char *client_flags[] =
{
"MDI_CLIENT_FLAGS_OFFLINE",
"MDI_CLIENT_FLAGS_SUSPEND",
"MDI_CLIENT_FLAGS_POWER_DOWN",
"MDI_CLIENT_FLAGS_DETACH",
"MDI_CLIENT_FLAGS_FAILOVER",
"MDI_CLIENT_FLAGS_REPORT_DEV",
"MDI_CLIENT_FLAGS_PATH_FREE_IN_PROGRESS",
"MDI_CLIENT_FLAGS_ASYNC_FREE",
"MDI_CLIENT_FLAGS_DEV_NOT_SUPPORTED",
};
char *mdi_pathinfo_states[] =
{
"MDI_PATHINFO_STATE_INIT",
"MDI_PATHINFO_STATE_ONLINE",
"MDI_PATHINFO_STATE_STANDBY",
"MDI_PATHINFO_STATE_FAULT",
"MDI_PATHINFO_STATE_OFFLINE",
};
char *mdi_pathinfo_ext_states[] =
{
"MDI_PATHINFO_STATE_USER_DISABLE",
"MDI_PATHINFO_STATE_DRV_DISABLE",
"MDI_PATHINFO_STATE_DRV_DISABLE_TRANSIENT",
};
char *mdi_phci_flags[] =
{
"MDI_PHCI_FLAGS_OFFLINE",
"MDI_PHCI_FLAGS_SUSPEND",
"MDI_PHCI_FLAGS_POWER_DOWN",
"MDI_PHCI_FLAGS_DETACH",
"MDI_PHCI_FLAGS_USER_DISABLE",
"MDI_PHCI_FLAGS_D_DISABLE",
"MDI_PHCI_FLAGS_D_DISABLE_TRANS",
"MDI_PHCI_FLAGS_POWER_TRANSITION",
};
char *vhci_conf_flags[] =
{
"VHCI_CONF_FLAGS_AUTO_FAILBACK",
};
char *svlun_flags[] =
{
"VLUN_TASK_D_ALIVE_FLG",
"VLUN_RESERVE_ACTIVE_FLG",
"VLUN_QUIESCED_FLG",
};