1e04145deschrock/*
2e04145deschrock * CDDL HEADER START
3e04145deschrock *
4e04145deschrock * The contents of this file are subject to the terms of the
5e04145deschrock * Common Development and Distribution License (the "License").
6e04145deschrock * You may not use this file except in compliance with the License.
7e04145deschrock *
8e04145deschrock * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9e04145deschrock * or http://www.opensolaris.org/os/licensing.
10e04145deschrock * See the License for the specific language governing permissions
11e04145deschrock * and limitations under the License.
12e04145deschrock *
13e04145deschrock * When distributing Covered Code, include this CDDL HEADER in each
14e04145deschrock * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15e04145deschrock * If applicable, add the following below this CDDL HEADER, with the
16e04145deschrock * fields enclosed by brackets "[]" replaced with your own identifying
17e04145deschrock * information: Portions Copyright [yyyy] [name of copyright owner]
18e04145deschrock *
19e04145deschrock * CDDL HEADER END
20e04145deschrock */
21e04145deschrock/*
22e04145deschrock * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23e04145deschrock * Use is subject to license terms.
24e04145deschrock */
25e04145deschrock
26e04145deschrock#pragma ident	"%Z%%M%	%I%	%E% SMI"
27e04145deschrock
28e04145deschrock#include <libsysevent.h>
29e04145deschrock#include <stdio.h>
30e04145deschrock
31e04145deschrockint
32e04145deschrockmain(int argc, char **argv)
33e04145deschrock{
34e04145deschrock	sysevent_id_t id;
35e04145deschrock
36e04145deschrock	for (;;) {
37e04145deschrock		if (sysevent_post_event("class_dtest", "subclass_dtest",
38e04145deschrock		    "vendor_dtest", "publisher_dtest", NULL, &id) != 0) {
39e04145deschrock			(void) fprintf(stderr, "failed to post sysevent\n");
40e04145deschrock			return (1);
41e04145deschrock		}
42e04145deschrock
43e04145deschrock		sleep(1);
44e04145deschrock	}
45e04145deschrock}
46