178189Sbrian/* 278189Sbrian * CDDL HEADER START 378189Sbrian * 478189Sbrian * The contents of this file are subject to the terms of the 578189Sbrian * Common Development and Distribution License (the "License"). 66059Samurai * You may not use this file except in compliance with the License. 778189Sbrian * 878189Sbrian * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 978189Sbrian * or http://www.opensolaris.org/os/licensing. 1078189Sbrian * See the License for the specific language governing permissions 1178189Sbrian * and limitations under the License. 1278189Sbrian * 1378189Sbrian * When distributing Covered Code, include this CDDL HEADER in each 1478189Sbrian * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 156059Samurai * If applicable, add the following below this CDDL HEADER, with the 1678189Sbrian * fields enclosed by brackets "[]" replaced with your own identifying 1778189Sbrian * information: Portions Copyright [yyyy] [name of copyright owner] 1878189Sbrian * 1978189Sbrian * CDDL HEADER END 2078189Sbrian */ 2178189Sbrian/* 2278189Sbrian * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 2378189Sbrian * Use is subject to license terms. 2478189Sbrian */ 2578189Sbrian 2678189Sbrian#pragma ident "%Z%%M% %I% %E% SMI" 276059Samurai 2850479Speter#include <libsysevent.h> 296059Samurai#include <stdio.h> 306735Samurai 316059Samuraiint 326059Samuraimain(int argc, char **argv) 336059Samurai{ 346059Samurai sysevent_id_t id; 356059Samurai 366059Samurai for (;;) { 376059Samurai if (sysevent_post_event("class_dtest", "subclass_dtest", 386059Samurai "vendor_dtest", "publisher_dtest", NULL, &id) != 0) { 396059Samurai (void) fprintf(stderr, "failed to post sysevent\n"); 406059Samurai return (1); 416059Samurai } 426059Samurai 436059Samurai sleep(1); 446059Samurai } 456059Samurai} 466059Samurai