CODE EXAMPLE 1-1 System Watchdog Node Management Code Example (Continued)
rc = print_wd_info(argc, argv, optind); (void) picl_shutdown();
return (picl2errno(rc));
}
if (argc != optind) {
(void) picl_shutdown(); usage();
}
if (mflg) {
if ((aflg + tflg) < 1) { /*
*m flag must be associated with atleast
*action or timeout
*/
(void) printf("wdadm: timeout and action values " "are missing\n");
(void) picl_shutdown(); usage();
}
rc = set_wd_params(wd_name, (aflg ? action : NULL), (tflg ? timeout : NULL));
}
if (cflg) {
if (oflg == 0) {
/* operation must be specified along with c option */ (void) printf("wdadm: operation argument is missing\n");
(void) picl_shutdown(); usage();
}
rc = control_wd(cntrl_name, op);
}
(void) picl_shutdown(); return (picl2errno(rc));
}