Sun Microsystems Netra CP2500 Programming Manual page 23

For the solaris operating system
Table of Contents

Advertisement

System Watchdog Node Management Code Example (Continued)
CODE EXAMPLE 1-1
/* read the property value */
if ((err = picl_get_propval(proph, *vbuf, pinfo.size)) !=
}
return (PICL_SUCCESS);
}
/*
* This function is used to set the value of a picl property
*/
static picl_errno_t
wdadm_set_picl_prop(picl_nodehdl_t nodeh, const char *prop_name,
{
picl_errno_t
picl_propinfo_t pinfo;
picl_prophdl_t
void
if ((err = picl_get_propinfo_by_name(nodeh, prop_name,
}
tmp_buf = alloca(pinfo.size);
if (tmp_buf == NULL) {
}
if (size > pinfo.size) {
}
bzero(tmp_buf, pinfo.size);
(void) memcpy(tmp_buf, vbuf, size);
/* set the property value */
if ((err = picl_set_propval(proph, vbuf, pinfo.size)) !=
}
return (PICL_SUCCESS);
}
/*
* This function prints the timeout, state, action of a
* watchdog-timer node
PICL_SUCCESS) {
return (err);
void *vbuf, int size)
err;
proph;
*tmp_buf;
&pinfo, &proph)) != PICL_SUCCESS) {
return (err);
return (PICL_NOSPACE);
return (PICL_VALUETOOBIG);
PICL_SUCCESS) {
return (err);
Chapter 1 Watchdog Timer
9

Advertisement

Table of Contents
loading

Table of Contents