Print this page
patch tsoome-feedback


 355          * ensure the LED action taken is the one requested
 356          */
 357         if ((req_ptr->sbl_action == PCP_SBL_DISABLE) &&
 358             (resp_ptr->sbl_state != SBL_STATE_OFF))
 359                 syslog(LOG_ERR, "piclsbl: OK2RM LED not OFF after disk "
 360                     "configuration");
 361         else if ((req_ptr->sbl_action == PCP_SBL_ENABLE) &&
 362             (resp_ptr->sbl_state != SBL_STATE_ON))
 363                 syslog(LOG_ERR, "piclsbl: OK2RM LED not ON after disk "
 364                     "unconfiguration");
 365         else if (resp_ptr->sbl_state == SBL_STATE_UNKNOWN)
 366                 syslog(LOG_ERR, "piclsbl: OK2RM LED set to unknown state");
 367 
 368 sbl_return:
 369 
 370         (*pcp_close_ptr)(channel_fd);
 371         if (req_ptr != NULL)
 372                 umem_free(req_ptr, sizeof (pcp_sbl_req_t));
 373         if (resp_ptr != NULL)
 374                 free(resp_ptr);
 375         if (nvlp != NULL)
 376                 nvlist_free(nvlp);
 377 }
 378 
 379 static void
 380 piclsbl_init(void)
 381 {
 382         char    platbuf[SYS_NMLN];
 383 
 384         /* check for Erie platform name */
 385         if ((sysinfo(SI_PLATFORM, platbuf, SYS_NMLN) != -1) &&
 386             ((strcmp(platbuf, ERIE_PLATFORM) == 0) ||
 387             (strcmp(platbuf, ERIE_PLATFORM2) == 0)))
 388                 return;
 389 
 390         /* retrieve the root node for lookups in the event handler */
 391         if ((ptree_get_root(&root_node)) != NULL)
 392                 return;
 393 
 394         /* load libpcp */
 395         if (load_pcp_libs()) {




 355          * ensure the LED action taken is the one requested
 356          */
 357         if ((req_ptr->sbl_action == PCP_SBL_DISABLE) &&
 358             (resp_ptr->sbl_state != SBL_STATE_OFF))
 359                 syslog(LOG_ERR, "piclsbl: OK2RM LED not OFF after disk "
 360                     "configuration");
 361         else if ((req_ptr->sbl_action == PCP_SBL_ENABLE) &&
 362             (resp_ptr->sbl_state != SBL_STATE_ON))
 363                 syslog(LOG_ERR, "piclsbl: OK2RM LED not ON after disk "
 364                     "unconfiguration");
 365         else if (resp_ptr->sbl_state == SBL_STATE_UNKNOWN)
 366                 syslog(LOG_ERR, "piclsbl: OK2RM LED set to unknown state");
 367 
 368 sbl_return:
 369 
 370         (*pcp_close_ptr)(channel_fd);
 371         if (req_ptr != NULL)
 372                 umem_free(req_ptr, sizeof (pcp_sbl_req_t));
 373         if (resp_ptr != NULL)
 374                 free(resp_ptr);

 375         nvlist_free(nvlp);
 376 }
 377 
 378 static void
 379 piclsbl_init(void)
 380 {
 381         char    platbuf[SYS_NMLN];
 382 
 383         /* check for Erie platform name */
 384         if ((sysinfo(SI_PLATFORM, platbuf, SYS_NMLN) != -1) &&
 385             ((strcmp(platbuf, ERIE_PLATFORM) == 0) ||
 386             (strcmp(platbuf, ERIE_PLATFORM2) == 0)))
 387                 return;
 388 
 389         /* retrieve the root node for lookups in the event handler */
 390         if ((ptree_get_root(&root_node)) != NULL)
 391                 return;
 392 
 393         /* load libpcp */
 394         if (load_pcp_libs()) {