/*
* 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-2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/sysevent.h>
#include <sys/sysevent_impl.h>
#include <libsysevent.h>
#include <libsysevent_impl.h>
#include "../genunix/sysevent.h"
int
{
if ((flags & DCMD_ADDRSPEC) == 0)
return (DCMD_USAGE);
addr) == -1) {
mdb_warn("can't walk sysevent queue");
return (DCMD_ERR);
}
return (DCMD_OK);
}
}
/*ARGSUSED*/
int
{
if ((flags & DCMD_ADDRSPEC) == 0)
return (DCMD_USAGE);
if (argc != 0)
return (DCMD_USAGE);
return (DCMD_ERR);
}
mdb_warn("failed to read channel name at %p",
return (DCMD_ERR);
}
return (DCMD_ERR);
}
if (DCMD_HDRSPEC(flags))
mdb_printf("%<u>%-?s %-24s %-13s %-5s %-?s"
"%</u>\n", "ADDR", "NAME", "TYPE", "ID",
"EVENT QUEUE ADDR");
mdb_printf("%-?p %-24s %-13s %-5lu %-?p\n",
} else {
if (DCMD_HDRSPEC(flags))
mdb_printf("%<u>%-?s %-24s %-13s %-5s %-?s"
"%</u>\n", "ADDR", "NAME",
"TYPE", "ID", "CLASS LIST ADDR");
mdb_printf("%-?p %-24s %-13s %-5lu %-?p\n",
}
return (DCMD_OK);
}
{ "sysevent", "?[-v]", "print the contents of a sysevent queue",
sysevent},
{ "sysevent_class_list", ":", "print sysevent class list",
{ "sysevent_subclass_list", ":", "print sysevent subclass list",
{ NULL }
};
int
{
mdb_warn("sysevent 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);
}
{ "sysevent", "walk sysevent buffer queue",
NULL },
{ "sysevent_class_list", "walk sysevent subsccription class list",
{ "sysevent_subclass_list", "walk sysevent subsccription subclass list",
{ NULL }
};
};
const mdb_modinfo_t *
_mdb_init(void)
{
return (&modinfo);
}