Print this page
NEX-5010 Fix for NEX-4680 introduced cstyle issues
Reviewed by: Jean McCormack <jean.mccormack@nexenta.com>
NEX-4680 NEF needs Sun_HBA_* API to be working after library reload
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>


 848 Sun_HBA_ForceLip(HBA_HANDLE handle, int *rval)
 849 {
 850         HBA_STATUS              status;
 851         HBA_LIBRARY_INFO        *lib_infop;
 852         HBA_HANDLE              vendorHandle;
 853 
 854         Sun_HBADoForceLipFunc   DoForceLipFunc;
 855 
 856         DEBUG(2, "Sun_HBA_DoForceLip", 0, 0, 0);
 857 
 858         NPIVCHECKLIBRARY();
 859         DoForceLipFunc = (Sun_HBADoForceLipFunc)
 860                 dlsym(lib_infop->hLibrary, "Sun_fcDoForceLip");
 861         if (DoForceLipFunc != NULL) {
 862                 status = ((DoForceLipFunc)(vendorHandle, rval));
 863         } else {
 864                 status = HBA_STATUS_ERROR_NOT_SUPPORTED;
 865         }
 866         RELEASE_MUTEX_RETURN(&_hbaapi_LL_mutex, status);
 867 }
























 848 Sun_HBA_ForceLip(HBA_HANDLE handle, int *rval)
 849 {
 850         HBA_STATUS              status;
 851         HBA_LIBRARY_INFO        *lib_infop;
 852         HBA_HANDLE              vendorHandle;
 853 
 854         Sun_HBADoForceLipFunc   DoForceLipFunc;
 855 
 856         DEBUG(2, "Sun_HBA_DoForceLip", 0, 0, 0);
 857 
 858         NPIVCHECKLIBRARY();
 859         DoForceLipFunc = (Sun_HBADoForceLipFunc)
 860                 dlsym(lib_infop->hLibrary, "Sun_fcDoForceLip");
 861         if (DoForceLipFunc != NULL) {
 862                 status = ((DoForceLipFunc)(vendorHandle, rval));
 863         } else {
 864                 status = HBA_STATUS_ERROR_NOT_SUPPORTED;
 865         }
 866         RELEASE_MUTEX_RETURN(&_hbaapi_LL_mutex, status);
 867 }
 868 
 869 HBA_STATUS
 870 Sun_HBA_FreeLibrary(void)
 871 {
 872         HBA_TGTADAPTER_INFO     *adapt_infop;
 873         HBA_TGTADAPTER_INFO     *adapt_next;
 874 
 875         GRAB_MUTEX(&_hbaapi_AL_mutex);
 876 
 877         for (adapt_infop = _hbaapi_tgtadapterlist;
 878             adapt_infop != NULL;
 879             adapt_infop = adapt_next) {
 880             adapt_next = adapt_infop->next;
 881                 free(adapt_infop->name);
 882                 free(adapt_infop);
 883         }
 884 
 885         _hbaapi_tgtadapterlist = NULL;
 886         _hbaapi_total_tgtadapter_count = 0;
 887 
 888         RELEASE_MUTEX_RETURN(&_hbaapi_AL_mutex, HBA_STATUS_OK);
 889 }