/*
* 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 2006 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 "ufs_cmds.h"
typedef struct ufslogmap_walk_data {
/*
* Ensure we are started with a user specified address.
* We also allocate a ufslogmap_walk_data_t for storage,
* and save this using the walk_data pointer.
*/
int
{
mdb_warn("must specify an address\n");
return (WALK_ERR);
}
return (WALK_NEXT);
}
/*
* Routine to step through one element of the list.
*/
int
{
/*
* Read the mapentry at the current walk address
*/
return (WALK_DONE);
}
/*
* Check for empty list.
*/
return (WALK_DONE);
}
/*
* Check for end of list.
*/
return (WALK_DONE);
}
/*
* Check for proper linkage
*/
return (WALK_DONE);
}
/*
* Save next address and call callback with current address
*/
wsp->walk_cbdata));
}
static const char *
{
switch (delta_type) {
case DT_NONE: return ("none");
case DT_SB: return ("sb");
case DT_CG: return ("cg");
case DT_SI: return ("si");
case DT_AB: return ("ab");
case DT_ABZERO: return ("abzero");
case DT_DIR: return ("dir");
case DT_INODE: return ("inode");
case DT_FBI: return ("fbi");
case DT_QR: return ("quota");
case DT_COMMIT: return ("commit");
case DT_CANCEL: return ("cancel");
case DT_BOT: return ("trans");
case DT_EOT: return ("etrans");
case DT_UD: return ("udata");
case DT_SUD: return ("sudata");
case DT_SHAD: return ("shadow");
default: return ("???");
}
}
/* ARGSUSED */
int
{
if (!(flags & DCMD_ADDRSPEC))
return (DCMD_USAGE);
if (DCMD_HDRSPEC(flags)) {
mdb_printf("%<u>%?s %6s %8s %8s %s%</u>\n",
"ADDR", "TYPE", "SIZE", "TRANS", "HANDLER");
}
return (DCMD_ABORT);
}
/*
* Validate mapentry
*/
return (DCMD_ABORT);
}
mdb_printf("%0?p %6s %8x %8x %a\n",
addr,
return (DCMD_OK);
}
typedef struct {
} mapstats_t;
/* ARGSUSED */
int
{
} else {
}
}
} else {
}
return (WALK_NEXT);
}
/*ARGSUSED*/
int
{
int i;
if (!(flags & DCMD_ADDRSPEC))
return (DCMD_USAGE);
mdb_warn("can't walk ufslogmap for stats");
return (DCMD_ERR);
}
mdb_printf("Multiple transactions\n");
} else {
}
mdb_printf("%<u>delta count(hex) avsize(hex)%</u>\n");
for (i = 0; i < DT_MAX; i++) {
mdb_printf("%6s %10X %10X\n",
}
}
}
return (DCMD_OK);
}