nsctl.c revision fcf3ce441efd61da9bb2884968af01cb7c1452cc
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <sys/mdb_modapi.h>
#define __NSC_GEN__
#include <sys/nsc_thread.h>
/*
* Data struct for the complex walks.
*/
struct complex_args {
int argc;
};
/*
* Bit definitions
*/
#define NSC_RW_BITS \
static const mdb_bitmask_t nsc_bhflag_bits[] = {
{ NULL, 0, 0 }
};
static const mdb_bitmask_t nsc_fdflag_bits[] = {
{ NULL, 0, 0 }
};
static const mdb_bitmask_t nsc_fdmode_bits[] = {
{ NULL, 0, 0 }
};
static const mdb_bitmask_t nsc_type_bits[] = {
/* types */
/* type flags */
/* ids */
{ NULL, 0, 0 }
};
static const mdb_bitmask_t nsc_availpend_bits[] = {
{ NULL, 0, 0 }
};
static const mdb_bitmask_t nsc_ioflag_bits[] = {
{ NULL, 0, 0 }
};
static const mdb_bitmask_t nstset_flag_bits[] = {
{ NULL, 0, 0 }
};
static const mdb_bitmask_t nst_flag_bits[] = {
{ NULL, 0, 0 }
};
/*
* Global data.
*/
static int complex_walk;
static int complex_hdr;
/* ---------------------------------------------------------------------- */
/*
* Walker for an nsc_io chain.
* A global walk is assumed to start at _nsc_io_top.
*/
static int
{
mdb_warn("unable to read '_nsc_io_top'");
return (WALK_ERR);
}
return (WALK_NEXT);
}
static int
{
int status;
return (WALK_DONE);
wsp->walk_cbdata);
return (WALK_DONE);
}
return (status);
}
/* ---------------------------------------------------------------------- */
/*
* Walker for an nsc_dev chain.
* A global walk is assumed to start at _nsc_dev_top.
*/
static int
{
mdb_warn("unable to read '_nsc_dev_top'");
return (WALK_ERR);
}
return (WALK_NEXT);
}
static int
{
int status;
return (WALK_DONE);
wsp->walk_cbdata);
return (WALK_DONE);
}
return (status);
}
/* ARGSUSED */
static void
{
complex_walk = 0;
}
/* ---------------------------------------------------------------------- */
/*
* Walker for a chain of nsc_devval_t structures.
* Global walks start from _nsc_devval_top;
*/
static int
{
mdb_warn("unable to read '_nsc_devval_top'");
return (WALK_ERR);
}
return (WALK_NEXT);
}
static int
{
int status;
if (!devval)
return (WALK_DONE);
wsp->walk_cbdata);
/* move on to next devval */
mdb_warn("failed to read nsc_devval_t.dv_next");
return (WALK_ERR);
}
return (status);
}
/* ---------------------------------------------------------------------- */
/*
* Walker for a chain of nsc_fd_t structures.
* No global walks.
*/
static int
{
mdb_warn("nsc_fd doesn't support global walks");
return (WALK_ERR);
}
return (WALK_NEXT);
}
static int
{
int status;
if (!fd)
return (WALK_DONE);
wsp->walk_cbdata);
/* move on to next fd */
mdb_warn("failed to read nsc_fd_t.sf_next");
return (WALK_ERR);
}
return (status);
}
/* ---------------------------------------------------------------------- */
/*
* Walker for a chain of nsc_iodev_t structures.
* No global walks.
*/
static int
{
mdb_warn("nsc_iodev doesn't support global walks");
return (WALK_ERR);
}
return (WALK_NEXT);
}
static int
{
int status;
if (!iodev)
return (WALK_DONE);
wsp->walk_cbdata);
mdb_warn("failed to read nsc_iodev_t.si_next");
return (WALK_ERR);
}
return (status);
}
/* ---------------------------------------------------------------------- */
/*
* Walker for a chain of nsc_service_t structures.
* Global walks start at _nsc_services.
*/
static int
{
mdb_warn("unable to read '_nsc_services'");
return (WALK_ERR);
}
return (WALK_NEXT);
}
static int
{
int status;
if (!service)
return (WALK_DONE);
wsp->walk_cbdata);
/* move on to next service */
mdb_warn("failed to read nsc_service_t.s_next");
return (WALK_ERR);
}
return (status);
}
/* ---------------------------------------------------------------------- */
/*
* Walker for a chain of nsc_svc_t structures.
* No global walks.
*/
static int
{
mdb_warn("nsc_svc does not support global walks");
return (WALK_ERR);
}
return (WALK_NEXT);
}
static int
{
int status;
if (!svc)
return (WALK_DONE);
wsp->walk_cbdata);
/* move on to next svc */
mdb_warn("failed to read nsc_svc_t.svc_next");
return (WALK_ERR);
}
return (status);
}
/* ---------------------------------------------------------------------- */
/*
* Walker for a chain of nsc_val_t structures.
* No global walks.
*/
static int
{
mdb_warn("nsc_val doesn't support global walks");
return (WALK_ERR);
}
return (WALK_NEXT);
}
static int
{
int status;
if (!val)
return (WALK_DONE);
wsp->walk_cbdata);
/* move on to next val */
mdb_warn("failed to read nsc_val_t.sv_next");
return (WALK_ERR);
}
return (status);
}
/* ---------------------------------------------------------------------- */
/*
* Walker for a chain of nstset_t structures.
* Global walks start at _nst_sets.
*/
static int
{
mdb_warn("unable to read 'nst_sets'");
return (WALK_ERR);
}
return (WALK_NEXT);
}
static int
{
int status;
if (!set)
return (WALK_DONE);
wsp->walk_cbdata);
/* move on to next set */
mdb_warn("failed to read nstset_t.set_next");
return (WALK_ERR);
}
return (status);
}
/* ---------------------------------------------------------------------- */
/*
* Walker for a chain of nsthread_t structures.
* No global walks.
*/
static int
{
mdb_warn("nsthread does not support global walks");
return (WALK_ERR);
}
return (WALK_NEXT);
}
static int
{
int status;
if (!thread)
return (WALK_DONE);
wsp->walk_cbdata);
/* move on to next iodev */
mdb_warn("failed to read nsthread_t.tp_chain");
return (WALK_ERR);
}
return (status);
}
/* ---------------------------------------------------------------------- */
/*
* No global walks.
*/
static int
{
mdb_warn("nst_free does not support global walks");
return (WALK_ERR);
}
/* store starting address */
/* move on to next thread */
mdb_warn("failed to read nsthread_t.tp_link.q_forw");
return (WALK_ERR);
}
return (WALK_NEXT);
}
static int
{
int status;
if (!thread)
return (WALK_DONE);
return (WALK_DONE);
wsp->walk_cbdata);
/* move on to next thread */
mdb_warn("failed to read nsthread_t.tp_link.q_forw");
return (WALK_ERR);
}
return (status);
}
/* ---------------------------------------------------------------------- */
/*
* Walker for a chain of nsc_mem_t structures.
* Global walks start at _nsc_mem_top.
*/
static int
{
mdb_warn("unable to read '_nsc_mem_top'");
return (WALK_ERR);
}
return (WALK_NEXT);
}
static int
{
int status;
if (!mem)
return (WALK_DONE);
wsp->walk_cbdata);
/* move on to next mem */
mdb_warn("failed to read nsc_mem_t.next");
return (WALK_ERR);
}
return (status);
}
/* ---------------------------------------------------------------------- */
struct {
char *name;
int id;
} io_ids[] = {
{ "NSC_RAW_ID", NSC_RAW_ID },
{ "NSC_FILE_ID", NSC_FILE_ID },
{ "NSC_FREEZE_ID", NSC_FREEZE_ID },
{ "NSC_SDBC_ID", NSC_SDBC_ID },
{ "NSC_RDCLR_ID", NSC_RDCLR_ID },
{ "NSC_RDCL_ID", NSC_RDCL_ID },
{ "NSC_IIR_ID", NSC_IIR_ID },
{ "NSC_II_ID", NSC_II_ID },
{ "NSC_RDCHR_ID", NSC_RDCHR_ID },
{ "NSC_RDCH_ID", NSC_RDCH_ID },
{ NULL, 0 }
};
static char *
{
int i;
}
}
return ("unknown");
}
/*
* Display a single nsc_io_t structure.
* If called with no address, performs a global walk of all nsc_ios.
*/
static int
{
char io_name[128];
int v_opt;
v_opt = 0;
return (DCMD_USAGE);
if (!(flags & DCMD_ADDRSPEC)) {
if (mdb_walk_dcmd("nsctl`nsc_io",
mdb_warn("failed to walk 'nsc_io'");
return (DCMD_ERR);
}
return (DCMD_OK);
}
return (DCMD_ERR);
}
mdb_warn("failed to read nsc_io_t.name");
return (DCMD_ERR);
}
}
if (DCMD_HDRSPEC(flags)) {
}
mdb_printf("%0?p %8T%08x %2x %4d %4d %s\n",
if (!v_opt)
return (DCMD_OK);
mdb_inc_indent(4);
mdb_dec_indent(4);
return (DCMD_OK);
}
/* ---------------------------------------------------------------------- */
/*
* Display a single nsc_dev_t structure.
* If called with no address, performs a global walk of all nsc_devs.
*/
static int
{
return (DCMD_USAGE);
if (!(flags & DCMD_ADDRSPEC)) {
mdb_printf("Active device structures:\n");
if (mdb_walk_dcmd("nsctl`nsc_dev",
mdb_warn("failed to walk 'nsc_dev'");
return (DCMD_ERR);
}
if (a_opt) {
mdb_warn("failed to read _nsc_dev_pend");
return (DCMD_ERR);
}
mdb_printf("\nPending device structures:");
if (dev_pend) {
mdb_printf("\n");
if (mdb_pwalk_dcmd("nsctl`nsc_dev",
dev_pend) == -1) {
mdb_warn("failed to walk "
"pending dev structs");
return (DCMD_ERR);
}
} else {
mdb_printf(" none\n");
}
}
return (DCMD_OK);
}
return (DCMD_ERR);
}
return (DCMD_ERR);
}
if (DCMD_HDRSPEC(flags)) {
}
mdb_printf("%0?p %8T%3d %4d %4d %4d %s\n",
if (!v_opt)
return (DCMD_OK);
mdb_inc_indent(4);
mdb_printf("next: %0?p %8Tclose: %0?p\n",
mdb_printf("list: %0?p %8Tlock: %0?p\n",
mdb_printf("cv: %0?p %8Tpath: %0?p %8Tphash: %016llx\n",
mdb_printf("drop: %d %8Treopen: %d\n",
if (dev->nsc_values) {
sizeof (*dv)) {
mdb_warn("unable to read nsc_dev_t.nsc_values");
mdb_dec_indent(4);
return (DCMD_ERR);
}
mdb_printf("device/values: (nsc_devval: %0?p)\n",
dev->nsc_values);
mdb_inc_indent(4);
mdb_dec_indent(8);
return (DCMD_ERR);
}
mdb_dec_indent(4);
}
}
mdb_dec_indent(4);
return (DCMD_OK);
}
/* ---------------------------------------------------------------------- */
/*
* Display a single nsc_devval_t structure.
* If called with no address, performs a global walk of all nsc_devs.
*/
static int
{
int a_opt;
a_opt = 0;
return (DCMD_USAGE);
if (!(flags & DCMD_ADDRSPEC)) {
if (mdb_walk_dcmd("nsctl`nsc_devval",
mdb_warn("failed to walk 'nsc_devval'");
return (DCMD_ERR);
}
return (DCMD_OK);
}
return (DCMD_ERR);
}
return (DCMD_OK);
}
if (DCMD_HDRSPEC(flags)) {
}
mdb_inc_indent(4);
return (DCMD_ERR);
}
} else {
mdb_printf("No values\n");
}
mdb_dec_indent(4);
return (DCMD_OK);
}
/* ---------------------------------------------------------------------- */
/*
* Part 2 callback for the all devices and fds walk. Called per iodev.
*/
/* ARGSUSED */
static int
{
mdb_warn("unable to read nsc_iodev_t.si_open");
return (WALK_ERR);
}
return (WALK_ERR);
}
return (WALK_NEXT);
}
/*
* Part 1 callback for the all devices and fds walk. Called per device.
*/
/* ARGSUSED */
static int
{
return (WALK_ERR);
}
/* walk iodev chains */
if (mdb_pwalk("nsctl`nsc_iodev",
return (WALK_ERR);
}
/* walk nsc_close (closing fds) chains */
return (WALK_ERR);
}
return (WALK_ERR);
}
return (WALK_NEXT);
}
/*
* Walk all devices and fds in the system.
*/
static int
{
struct complex_args fdall;
complex_walk = 1;
complex_hdr = 0;
return (DCMD_ERR);
}
return (DCMD_OK);
}
/*
* Display an nsd_fd_t structure, or walk all devices and fds in the system.
*/
static int
{
int v_opt;
int hdr;
v_opt = 0;
return (DCMD_USAGE);
if (!(flags & DCMD_ADDRSPEC)) {
}
return (DCMD_ERR);
}
sizeof (pathp)) {
mdb_warn("failed to read nsc_dev.nsc_path");
return (DCMD_ERR);
}
mdb_warn("failed to read nsc_path");
return (DCMD_ERR);
}
sizeof (io)) {
mdb_warn("failed to read nsc_iodev.si_io");
return (DCMD_ERR);
}
sizeof (io_namep)) {
mdb_warn("failed to read nsc_io_t.name");
return (DCMD_ERR);
}
mdb_warn("failed to read nsc_io_t.name string");
return (DCMD_ERR);
}
}
hdr = 0;
if (complex_walk) {
if (!complex_hdr) {
complex_hdr = 1;
hdr = 1;
}
} else if (DCMD_HDRSPEC(flags)) {
hdr = 1;
}
if (hdr) {
mdb_printf("%-?s %8T%-?s %8T%-8s %-?s\n",
"fd", "dev", "io", "cd");
}
mdb_printf("%0?p %8T%0?p %8T%-8s %p\n",
mdb_printf(" %0?p %8T%2d %4x %2x %s\n",
if (!v_opt)
return (DCMD_OK);
mdb_inc_indent(4);
mdb_dec_indent(4);
return (DCMD_OK);
}
/* ---------------------------------------------------------------------- */
/*
* Callback for the all devices and iodevs walk. Called per device.
*/
/* ARGSUSED */
static int
{
return (WALK_ERR);
}
/* walk iodev chains */
return (WALK_ERR);
}
return (WALK_NEXT);
}
/*
* Walk all devices and iodevs in the system.
*/
static int
{
struct complex_args iodevall;
complex_walk = 1;
complex_hdr = 0;
return (DCMD_ERR);
}
return (DCMD_OK);
}
/*
* Display an nsc_iodev_t structure, or walk all devices and
* iodevs in the system.
*/
static int
{
int v_opt;
int hdr;
v_opt = 0;
return (DCMD_USAGE);
if (!(flags & DCMD_ADDRSPEC)) {
}
return (DCMD_ERR);
}
sizeof (pathp)) {
mdb_warn("failed to read nsc_dev.nsc_path");
return (DCMD_ERR);
}
mdb_warn("failed to read nsc_path");
return (DCMD_ERR);
}
sizeof (io_namep)) {
mdb_warn("failed to read nsc_io_t.name");
return (DCMD_ERR);
}
mdb_warn("failed to read nsc_io_t.name string");
return (DCMD_ERR);
}
hdr = 0;
if (complex_walk) {
if (!complex_hdr) {
complex_hdr = 1;
hdr = 1;
}
} else if (DCMD_HDRSPEC(flags)) {
hdr = 1;
}
if (hdr) {
mdb_printf("%-?s %8T%-?s ref %-8s path\n",
"iodev", "dev", "io");
}
mdb_printf("%0?p %8T%0?p %3d %-8s %s\n",
if (!v_opt)
return (DCMD_OK);
mdb_inc_indent(4);
mdb_printf("open fds: %?p %8Tactive ios: %?p\n",
mdb_printf("busy: %d %8Trsrv pend: %d\n",
mdb_dec_indent(4);
return (DCMD_OK);
}
/* ---------------------------------------------------------------------- */
/*
* Display an nsc_service_t structure, or walk all services.
*/
static int
{
char s_name[32];
int v_opt;
v_opt = 0;
return (DCMD_USAGE);
if (!(flags & DCMD_ADDRSPEC)) {
if (mdb_walk_dcmd("nsctl`nsc_service",
mdb_warn("failed to walk 'nsc_service'");
return (DCMD_ERR);
}
return (DCMD_OK);
}
return (DCMD_ERR);
}
if (DCMD_HDRSPEC(flags)) {
}
mdb_warn("failed to read nsc_io_t.name");
return (DCMD_ERR);
}
}
if (!v_opt)
return (DCMD_OK);
mdb_inc_indent(4);
mdb_printf("servers:\n");
mdb_printf("<none>\n");
} else {
mdb_inc_indent(4);
mdb_dec_indent(8);
return (DCMD_ERR);
}
mdb_dec_indent(4);
}
mdb_printf("clients:\n");
mdb_printf("<none>\n");
} else {
mdb_inc_indent(4);
mdb_dec_indent(8);
return (DCMD_ERR);
}
mdb_dec_indent(4);
}
mdb_dec_indent(4);
return (DCMD_OK);
}
/* ---------------------------------------------------------------------- */
/*
* Display an nsc_svc_t structure.
*/
/*ARGSUSED*/
static int
{
if (!(flags & DCMD_ADDRSPEC))
return (DCMD_USAGE);
return (DCMD_ERR);
}
if (DCMD_HDRSPEC(flags)) {
}
return (DCMD_OK);
}
/* ---------------------------------------------------------------------- */
/*
* Display a single nsc_val_t structure.
* If called with no address, performs a global walk of all nsc_devs.
*/
/* ARGSUSED3 */
static int
{
if (argc != 0)
return (DCMD_USAGE);
if (!(flags & DCMD_ADDRSPEC)) {
mdb_warn("nsc_val requires an address");
return (DCMD_ERR);
}
return (DCMD_ERR);
}
if (DCMD_HDRSPEC(flags)) {
}
return (DCMD_OK);
}
/* ---------------------------------------------------------------------- */
/*
* Display an nstset_t structure, or walk all sets.
*/
static int
{
return (DCMD_USAGE);
/* displaying threads implies verbose */
v_opt = 1;
if (!(flags & DCMD_ADDRSPEC)) {
if (mdb_walk_dcmd("nsctl`nstset",
mdb_warn("failed to walk 'nstset'");
return (DCMD_ERR);
}
return (DCMD_OK);
}
return (DCMD_ERR);
}
if (DCMD_HDRSPEC(flags)) {
}
if (!v_opt)
return (DCMD_OK);
mdb_inc_indent(4);
mdb_printf("chain: %0?p %8Tpending: %4d res_cnt: %4d\n",
mdb_printf("reuse.forw: %-?s %8Treuse.back: %s\n",
"empty", "empty");
} else {
mdb_printf("reuse.forw: %0?p %8Treuse.back: %0?p\n",
/* display all threads in reuse list */
if (r_opt &&
mdb_dec_indent(4);
return (DCMD_ERR);
}
}
mdb_printf("free.forw: %-?s %8Tfree.back: %s\n",
"empty", "empty");
} else {
mdb_printf("free.forw: %0?p %8Tfree.back: %0?p\n",
/* display all threads in free list */
if (f_opt &&
mdb_dec_indent(4);
return (DCMD_ERR);
}
}
mdb_printf("flag: %08x <%b>\n",
/* display all threads in set */
if (t_opt) {
mdb_printf("all threads in set:\n");
mdb_dec_indent(4);
return (DCMD_ERR);
}
}
mdb_dec_indent(4);
return (DCMD_OK);
}
/* ---------------------------------------------------------------------- */
/*
* Callback for the all nstsets and threads walk. Called per set.
*/
/* ARGSUSED */
static int
{
char set_name[48];
return (WALK_ERR);
}
}
/* walk thread chains */
return (WALK_ERR);
} else
mdb_printf(" no threads\n");
mdb_printf("\n");
return (WALK_NEXT);
}
/*
* Walk all nstsets and threads in the system.
*/
static int
{
struct complex_args thrall;
return (DCMD_ERR);
return (DCMD_OK);
}
/*
* Display an nsthread_t structure, or walk all threads.
*/
static int
{
nsthread_t *tp;
int rc;
return (DCMD_USAGE);
if (!(flags & DCMD_ADDRSPEC)) {
return (rc);
if (a_opt) {
mdb_warn("unable to read 'nst_pending'");
return (DCMD_ERR);
}
if (thrpend) {
mdb_printf("\nPending threads:\n");
if (mdb_pwalk_dcmd("nsctl`nsthread",
thrpend) == -1) {
mdb_warn("failed to walk 'nsthread'");
return (DCMD_ERR);
}
}
}
return (DCMD_OK);
}
return (DCMD_ERR);
}
if (DCMD_HDRSPEC(flags)) {
}
mdb_printf("%0?p %8T%4x %0?p %8T%a\n",
if (!v_opt)
return (DCMD_OK);
mdb_inc_indent(4);
mdb_printf("set: %0?p %8Tchain: %0?p\n",
mdb_printf("link.forw: %0?p %8Tlink.back: %0?p\n",
mdb_printf("flag: %08x <%b>\n",
mdb_dec_indent(4);
return (DCMD_OK);
}
/* ---------------------------------------------------------------------- */
static void
{
int nslot;
char *cp;
return;
}
return;
}
mdb_printf("\nmap name offset size nslot\n");
mdb_printf("%16s %9d %9d %5d\n",
mdb_printf("\nslot name offset size inuse\n");
while (--nslot) {
mdb_warn("unable to read rmap '%s' slot @ %p",
return;
}
continue;
if (*cp == ':')
*cp = ' ';
mdb_printf("%16s %9d %9d %08x\n",
}
}
static void
nsc_rmhdr(void)
{
mdb_warn("unable to read _nsc_rmhdr_ptr");
return;
}
if (!addr) {
mdb_printf("\n\nGlobal header not initialised\n");
return;
}
return;
}
mdb_printf("\n\nglobal header (magic %08x, version %d, size %d)\n",
nsc_rmap("_nsc_global_map");
}
static nsc_mem_t *
{
int i;
type &= NSC_MEM_GLOBAL;
if (type)
flag = 0;
return (&type_mem[0]);
return (&type_mem[i]);
}
return (&type_mem[i]);
}
return (&type_mem[i]);
}
#define typename(t) \
#define memname(t) \
static void
{
if (first) {
mdb_printf("\nregion typ f ");
mdb_printf("used hwm pgs alloc free\n");
}
mdb_printf("%16s %s %2x %9d %9d %6d %5d %5d\n",
}
static int
{
int first;
int i;
if (mdb_walk_dcmd("nsctl`nsc_mem",
mdb_warn("unable to walk 'nsc_mem'");
return (DCMD_ERR);
}
for (first = 1, i = 0;
}
}
if (v_opt)
nsc_rmhdr();
return (DCMD_OK);
}
static int
{
int v_opt;
v_opt = 0;
return (DCMD_USAGE);
if (!(flags & DCMD_ADDRSPEC)) {
}
return (DCMD_ERR);
}
return (DCMD_ERR);
}
return (DCMD_OK);
if (DCMD_HDRSPEC(flags)) {
mdb_printf("name typ f ");
mdb_printf("used hwm pgs alloc free base\n");
}
if (*cp == ':')
*cp = ' ';
mdb_printf("%-16s %s %2x %9d %9d %5d %5d %5d %0?p\n",
return (DCMD_OK);
}
/*ARGSUSED*/
static int
{
return (DCMD_ERR);
}
mdb_inc_indent(4);
mdb_dec_indent(4);
mdb_printf("};\n");
return (DCMD_OK);
else
return (DCMD_ERR);
}
/* ---------------------------------------------------------------------- */
/*
* Display an nsc_buf_t structure.
*/
#ifdef NSC_MULTI_TERABYTE
#define STRCONV "ll"
#else
#define STRCONV ""
#endif
/* ARGSUSED */
static int
{
nsc_vec_t *v;
if (!(flags & DCMD_ADDRSPEC))
return (DCMD_USAGE);
return (DCMD_ERR);
}
mdb_inc_indent(4);
#ifdef NSC_MULTI_TERABYTE
#else
#endif
v++;
mdb_dec_indent(4);
mdb_printf("};\n");
return (DCMD_OK);
}
/* ---------------------------------------------------------------------- */
/* ARGSUSED */
static int
{
nsc_dbuf_t *bh;
if (!(flags & DCMD_ADDRSPEC))
return (DCMD_USAGE);
return (DCMD_ERR);
}
mdb_inc_indent(4);
mdb_dec_indent(4);
mdb_printf("};\n");
return (DCMD_OK);
}
/* ---------------------------------------------------------------------- */
/*
* MDB module linkage information:
*/
static const mdb_dcmd_t dcmds[] = {
#if 0
#endif
{ NULL }
};
static const mdb_walker_t walkers[] = {
{ "nsc_dev", "walk nsc_dev chain",
{ "nsc_devval", "walk nsc_devval chain",
{ "nsc_fd", "walk nsc_fd chain",
{ "nsc_io", "walk nsc_io chain",
{ "nsc_iodev", "walk nsc_iodev chain",
{ "nsc_mem", "walk nsc_mem chain",
{ "nsc_service", "walk nsc_service chain",
{ "nsc_svc", "walk nsc_svc chain",
{ "nsc_val", "walk nsc_val chain",
{ "nstset", "walk nstset chain",
{ "nsthread", "walk nsthread chain",
{ NULL }
};
static const mdb_modinfo_t modinfo = {
};
const mdb_modinfo_t *
_mdb_init(void)
{
return (&modinfo);
}