/*
* 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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <mdb/mdb_modapi.h>
#include <pthread.h>
#include <stddef.h>
#include <libuutil.h>
#include <libuutil_impl.h>
/*ARGSUSED*/
static int
{
return (DCMD_USAGE);
mdb_warn("unable to read uu_panic_thread");
}
if (uu_panic_thread != 0) {
}
return (DCMD_OK);
}
/*ARGSUSED*/
static int
{
if (!(flags & DCMD_ADDRSPEC)) {
argv) == -1) {
mdb_warn("can't walk uu_list_pool");
return (DCMD_ERR);
}
return (DCMD_OK);
}
if (argc != 0)
return (DCMD_USAGE);
if (DCMD_HDRSPEC(flags))
mdb_printf("%-?s %-30s %?s %5s\n",
"ADDR", "NAME", "COMPARE", "FLAGS");
mdb_warn("failed to read uu_list_pool\n");
return (DCMD_ERR);
}
return (DCMD_OK);
}
/*ARGSUSED*/
static int
{
return (DCMD_USAGE);
mdb_warn("failed to read uu_list\n");
return (DCMD_ERR);
}
if (DCMD_HDRSPEC(flags))
mdb_printf("%-?s %-?s %-?s %6s %5s\n",
"ADDR", "POOL", "PARENT", "NODES", "FLAGS");
mdb_printf("%0?p %0?p %0?p %6u %c%c\n",
return (DCMD_OK);
}
typedef struct uutil_listpool_walk {
int
{
-1) {
mdb_warn("failed to find 'uu_null_lpool'\n");
return (WALK_ERR);
}
-1) {
mdb_warn("failed to read data from 'uu_null_lpool' address\n");
return (WALK_ERR);
}
return (WALK_NEXT);
}
int
{
int status;
return (WALK_ERR);
}
return (WALK_DONE);
return (status);
}
void
{
}
typedef struct uutil_list_walk {
int
{
mdb_warn("failed to read uu_list_pool_t at given address\n");
return (WALK_ERR);
}
return (WALK_DONE);
ulw->ulw_current =
return (WALK_NEXT);
}
int
{
int status;
return (WALK_ERR);
}
return (WALK_DONE);
return (status);
}
void
{
}
typedef struct uutil_list_node_walk {
void *ulnw_buf;
int
{
mdb_warn("failed to read uu_list_t at given address\n");
return (WALK_ERR);
}
-1) {
mdb_warn("failed to read supporting uu_list_pool_t\n");
return (WALK_ERR);
}
return (WALK_NEXT);
}
int
{
int status;
return (WALK_DONE);
-1) {
return (WALK_ERR);
}
return (WALK_ERR);
}
/*
* Correct for offset; we return the address of the included structure.
*/
return (status);
}
void
{
}
uutil_list },
{ NULL }
};
{ "uu_list_pool", "walk uu_list_pools",
{ "uu_list", "given a uu_list_pool, walk its uu_lists",
{ "uu_list_node",
"given a uu_list, walk its nodes, returning container addr",
{ NULL }
};
};
const mdb_modinfo_t *
_mdb_init(void)
{
return (&modinfo);
}