inj_cmds.c revision d9638e547d8811f2c689977f8dd2a353938b61fd
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * CDDL HEADER START
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * The contents of this file are subject to the terms of the
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * Common Development and Distribution License, Version 1.0 only
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * (the "License"). You may not use this file except in compliance
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * with the License.
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * See the License for the specific language governing permissions
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * and limitations under the License.
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * When distributing Covered Code, include this CDDL HEADER in each
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * If applicable, add the following below this CDDL HEADER, with the
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * fields enclosed by brackets "[]" replaced with your own identifying
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * information: Portions Copyright [yyyy] [name of copyright owner]
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * CDDL HEADER END
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * Use is subject to license terms.
c77a61a72b5ecdc507d6cf104142edd371a16c84yz#pragma ident "%Z%%M% %I% %E% SMI"
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * The "program" executed by the injector consists of a tree of commands.
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * Routines in this file build and execute said command tree.
c77a61a72b5ecdc507d6cf104142edd371a16c84yz * Command tree construction
c77a61a72b5ecdc507d6cf104142edd371a16c84yz inj_randelem_t *re = inj_zalloc(sizeof (inj_randelem_t));
c77a61a72b5ecdc507d6cf104142edd371a16c84yz return (re);
c77a61a72b5ecdc507d6cf104142edd371a16c84yz cmd->cmd_rand = inj_alloc(sizeof (inj_randelem_t *) * nelems);
c77a61a72b5ecdc507d6cf104142edd371a16c84yz for (r = rlist, i = 0; i < nelems; i++, r = r->re_next) {
return (cmd);
inj_cmd_endhrt(void)
static uint64_t
inj_ena(void)
if (!quiet) {
if (verbose) {
if (!quiet)
case CMD_SEND_EVENT:
case CMD_SLEEP:
case CMD_RANDOM:
if (verbose) {