/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/mdb_modapi.h>
#include <sys/sgsbbc_priv.h>
/*
* Given the address of a soft state pointer for the SGSBBC driver,
* this function displays the values of selected fields.
*
* You have to specify the address of the soft state structure you
* want to decode. This dcmd does not automatically work that out
* for you. The contents of <sbbcp> points to the variable pointing
* to the soft state pointers.
*
* (ie. typing "**sbbcp/10J" at the mdb prompt will list the addresses
* of the first 10 soft state structures (if they exist).
*
* It can also be obtained using mdb's softstate dcmd.
* "*sbbcp::softstate 0 | ::sgsbbc_softstate"
*/
/* ARGSUSED */
int
{
/*
* You have to specify the address of the soft state structure you
* want to decode. This dcmd does not automatically work that out.
*/
if ((flags & DCMD_ADDRSPEC) == 0)
return (DCMD_ERR);
if (rv != sizeof (sbbc_softstate_t)) {
return (DCMD_ERR);
}
return (DCMD_OK);
}
/*
* MDB module linkage information:
*/
"sgsbbc_softstate",
NULL,
"print SGSBBC mailbox driver softstate fields",
}, { NULL }
};
};
const mdb_modinfo_t *
_mdb_init(void)
{
return (&modinfo);
}