Sun Microsystems Netra CP2500 Programming Manual page 26

For the solaris operating system
Table of Contents

Advertisement

System Watchdog Node Management Code Example (Continued)
CODE EXAMPLE 1-1
} while (err == PICL_SUCCESS);
return (PICL_WALK_CONTINUE); /* move to next controller */
}
/*
* This routine is used to print the information of watchdog nodes
*/
static int
print_wd_info(int argc, char **argv, int optind)
{
int
wdadm_args_t
wdadm_args_t
if (argc == optind) {
} else {
}
err = picl_walk_tree_by_class(rooth, PICL_WATCHDOG_CONTROLLER,
if (count == 0) {
12
Netra CP2500 Board Programming Guide • March 2007
if (wd_arg == NULL || print) {
if (count == 0) {
(void) printf("%s", HEADER);
count++;
}
(void) printf("%-30s", name);
(void) print_watchdog_node_props(peerh);
(void) printf("\n");
print = 0;
}
/* move to next timer node */
err = picl_get_propval_by_name(peerh, PICL_PROP_PEER,
&peerh, sizeof (picl_nodehdl_t));
err = PICL_SUCCESS;
*args = NULL;
wd_args;
/* print information of all the nodes */
args
= NULL;
/* print information of only specified nodes */
wd_args.list = argv;
wd_args.start_index = optind;
wd_args.max_index = argc;
args
= &wd_args;
(void
*)args, wd_printf_info);
(void) fprintf(stderr, "%s:Node not found:%d\n",
prog, picl2errno(PICL_NODENOTFOUND));
return (PICL_NODENOTFOUND);

Advertisement

Table of Contents
loading

Table of Contents