lofs.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 <mdb/mdb_modapi.h>
typedef struct lnode_walk {
} lnode_walk_t;
int
{
int lofsfstype;
mdb_warn("failed to read 'lofsfstype' symbol\n");
return (WALK_ERR);
}
mdb_warn("failed to read 'rootvfs' symbol\n");
return (WALK_ERR);
}
do {
continue;
}
/*
* No lofs filesystems mounted.
*/
return (WALK_DONE);
}
htsize = 0;
do {
continue;
}
/*
* Something must have resized.
*/
goto retry;
}
} else {
return (WALK_ERR);
}
mdb_warn("%p does not point to a lofs mount vfs\n",
return (WALK_ERR);
}
mdb_warn("failed to read struct loinfo from '%p'\n",
return (WALK_ERR);
}
}
return (WALK_NEXT);
}
int
{
/*
* If the next lnode_t address we want is NULL, advance to the next
* hash bucket. When we reach lw_tabsz, we're done.
*/
else
return (WALK_DONE);
}
/*
* When we have an lnode_t address, read the lnode and invoke the
* walk callback. Keep the next lnode_t address in wsp->walk_addr.
*/
}
void
{
}
/*ARGSUSED*/
static int
{
mdb_printf("%?p %?p %?p\n",
return (DCMD_OK);
}
/*ARGSUSED*/
int
{
if (argc != 0)
return (DCMD_USAGE);
if (DCMD_HDRSPEC(flags)) {
mdb_printf("%<u>%?s %?s %?s%</u>\n",
"LNODE", "VNODE", "REALVP");
}
if (flags & DCMD_ADDRSPEC) {
}
return (DCMD_ERR);
return (DCMD_OK);
}
/*ARGSUSED*/
int
{
if (argc != 0)
return (DCMD_ERR);
return (DCMD_OK);
}
static const mdb_dcmd_t dcmds[] = {
{ NULL }
};
static const mdb_walker_t walkers[] = {
{ "lnode", "hash of lnode structures",
{ NULL }
};
static const mdb_modinfo_t modinfo = {
};
const mdb_modinfo_t *
_mdb_init(void)
{
return (&modinfo);
}