sysevent.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 2002 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "sysevent.h"
int
{
int size;
if (DCMD_HDRSPEC(flags)) {
if ((opt_flags & SYSEVENT_VERBOSE) == 0) {
mdb_printf("%<u>%-?s %-16s %-9s %-10s "
"%-?s%</u>\n", "ADDRESS", "SEQUENCE ID",
"CLASS", "SUBCLASS", "NVPAIR BUF ADDR");
}
}
/*
* Read in the sysevent buffer header first. After extracting
* the size of the buffer, re-read the buffer in its entirety.
*/
return (DCMD_ERR);
}
return (DCMD_ERR);
}
if ((opt_flags & SYSEVENT_VERBOSE) == 0) {
char ev_class[CLASS_FIELD_MAX];
char ev_subclass[SUBCLASS_FIELD_MAX];
"...");
mdb_printf("%-?p %-16llu %-9s %-10s %-?p%\n",
} else {
}
return (DCMD_OK);
}
int
{
int subclass_name_sz;
if ((flags & DCMD_ADDRSPEC) == 0)
return (DCMD_USAGE);
if (mdb_pwalk_dcmd("sysevent_subclass_list",
mdb_warn("can't walk sysevent subclass list");
return (DCMD_ERR);
}
return (DCMD_OK);
}
if (DCMD_HDRSPEC(flags)) {
mdb_printf("%<u>%-?s %-24s %-?s%</u>\n",
"ADDR", "NAME", "SUBSCRIBER DATA ADDR");
}
return (DCMD_ERR);
}
mdb_warn("failed to read class name at %p",
return (DCMD_ERR);
}
return (DCMD_OK);
}
int
{
int class_name_sz;
char class_name[CLASS_LIST_FIELD_MAX];
if ((flags & DCMD_ADDRSPEC) == 0)
return (DCMD_USAGE);
mdb_warn("can't walk sysevent class list");
return (DCMD_ERR);
}
return (DCMD_OK);
}
if (DCMD_HDRSPEC(flags))
mdb_printf("%<u>%-?s %-24s %-?s%</u>\n",
"ADDR", "NAME", "SUBCLASS LIST ADDR");
return (DCMD_ERR);
}
mdb_warn("failed to read class name at %p",
return (DCMD_ERR);
}
return (DCMD_OK);
}
int
{
mdb_warn("sysevent_subclass_list does not support global "
"walks");
return (WALK_ERR);
}
return (WALK_NEXT);
}
int
{
int status;
return (WALK_DONE);
return (WALK_ERR);
}
wsp->walk_cbdata);
return (status);
}
void
{
}
typedef struct class_walk_data {
int hash_index;
int
{
mdb_warn("sysevent_class_list does not support global walks");
return (WALK_ERR);
}
mdb_warn("failed to read class hash table at %p",
return (WALK_ERR);
}
return (WALK_NEXT);
}
int
{
/* Skip over empty class table entries */
mdb_warn("failed to read class list at %p",
return (WALK_ERR);
}
wsp->walk_cbdata);
} else {
return (WALK_DONE);
} else {
cl_walker->hash_index++;
}
}
return (status);
}
void
{
}
#ifdef _KERNEL
int
{
return (DCMD_USAGE);
if ((flags & DCMD_ADDRSPEC) == 0) {
if (sys_flags & SYSEVENT_SENTQ) {
argv) == -1) {
mdb_warn("can not walk sent queue");
return (DCMD_ERR);
}
} else {
argv) == -1) {
mdb_warn("can not walk pending queue");
return (DCMD_ERR);
}
}
return (DCMD_OK);
}
}
int
{
char channel_name[CHAN_FIELD_MAX];
if (argc != 0)
return (DCMD_USAGE);
if ((flags & DCMD_ADDRSPEC) == 0) {
mdb_warn("can't walk sysevent channel");
return (DCMD_ERR);
}
return (DCMD_OK);
}
if (DCMD_HDRSPEC(flags))
mdb_printf("%<u>%-?s %-16s %-8s %-?s%</u>\n",
"ADDR", "NAME", "REF CNT", "CLASS LST ADDR");
return (DCMD_ERR);
}
mdb_warn("failed to read channel name at %p",
return (DCMD_ERR);
}
mdb_printf("%-?p %-16s %-8lu %-?p\n",
return (DCMD_OK);
}
typedef struct channel_walk_data {
int hash_index;
int
{
mdb_warn("sysevent_channel supports only global walks");
return (WALK_ERR);
}
== -1) {
mdb_warn("failed to read 'registered_channels'");
return (WALK_ERR);
}
return (WALK_NEXT);
}
int
{
/* Skip over empty hash table entries */
mdb_warn("failed to read channel at %p",
return (WALK_ERR);
}
wsp->walk_cbdata);
} else {
return (WALK_DONE);
} else {
ch_walker->hash_index++;
}
}
return (status);
}
void
{
}
int
{
mdb_warn("failed to read 'log_eventq_head'");
return (WALK_ERR);
}
}
return (WALK_NEXT);
}
int
{
int status;
return (WALK_DONE);
return (WALK_ERR);
}
wsp->walk_cbdata);
return (status);
}
int
{
mdb_warn("failed to read 'log_eventq_sent'");
return (WALK_ERR);
}
}
return (WALK_NEXT);
}
void
{
}
#endif