Sun Microsystems Netra CP2500 Programming Manual page 33

For the solaris operating system
Table of Contents

Advertisement

System Watchdog Node Management Code Example (Continued)
CODE EXAMPLE 1-1
}
/* check if more than one action is specified */
if ((lflg + cflg + mflg) > 1) {
}
if ((lflg + cflg + mflg) == 0) {
}
err = picl_initialize();
if (err != PICL_SUCCESS) {
}
err = picl_get_root(&rooth);
if (err != PICL_SUCCESS) {
}
if (lflg) {
tflg = 1;
(void) strlcpy(timeout, optarg,
PICL_CLASSNAMELEN_MAX);
break;
case 'a':
aflg = 1;
(void) strlcpy(action, optarg,
PICL_CLASSNAMELEN_MAX);
break;
case 'h':
(void) printf("%s\n", USAGE_STR);
(void) printf("%s", DETAILED_HELP);
exit(0);
case '?': /*FALLTHROUGH*/
default:
usage();
/*NOTREACHED*/
}
(void) printf("wdadm: more than one action "
"specified (-l,-m,-c)\n");
usage();
/* if no args are specified, default action is listing */
lflg++;
print_errmsg(gettext(err_msg[EM_INIT]), picl_strerror(err));
exit(1);
print_errmsg(gettext(err_msg[EM_GETROOT]),
picl_strerror(err));
(void) picl_shutdown();
exit(1);
Chapter 1 Watchdog Timer
19

Advertisement

Table of Contents
loading

Table of Contents