1*10275SReed.Liu@Sun.COM /* 2*10275SReed.Liu@Sun.COM * CDDL HEADER START 3*10275SReed.Liu@Sun.COM * 4*10275SReed.Liu@Sun.COM * The contents of this file are subject to the terms of the 5*10275SReed.Liu@Sun.COM * Common Development and Distribution License (the "License"). 6*10275SReed.Liu@Sun.COM * You may not use this file except in compliance with the License. 7*10275SReed.Liu@Sun.COM * 8*10275SReed.Liu@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*10275SReed.Liu@Sun.COM * or http://www.opensolaris.org/os/licensing. 10*10275SReed.Liu@Sun.COM * See the License for the specific language governing permissions 11*10275SReed.Liu@Sun.COM * and limitations under the License. 12*10275SReed.Liu@Sun.COM * 13*10275SReed.Liu@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each 14*10275SReed.Liu@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*10275SReed.Liu@Sun.COM * If applicable, add the following below this CDDL HEADER, with the 16*10275SReed.Liu@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying 17*10275SReed.Liu@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner] 18*10275SReed.Liu@Sun.COM * 19*10275SReed.Liu@Sun.COM * CDDL HEADER END 20*10275SReed.Liu@Sun.COM */ 21*10275SReed.Liu@Sun.COM /* 22*10275SReed.Liu@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23*10275SReed.Liu@Sun.COM * Use is subject to license terms. 24*10275SReed.Liu@Sun.COM */ 25*10275SReed.Liu@Sun.COM 26*10275SReed.Liu@Sun.COM #include "Handle.h" 27*10275SReed.Liu@Sun.COM #include "Trace.h" 28*10275SReed.Liu@Sun.COM #include "Exceptions.h" 29*10275SReed.Liu@Sun.COM #ifdef __cplusplus 30*10275SReed.Liu@Sun.COM extern "C" { 31*10275SReed.Liu@Sun.COM #endif 32*10275SReed.Liu@Sun.COM 33*10275SReed.Liu@Sun.COM /** 34*10275SReed.Liu@Sun.COM * @memo Retrieves the attributes for an adapter 35*10275SReed.Liu@Sun.COM * @precondition Library must be loaded 36*10275SReed.Liu@Sun.COM * @return HBA_STATUS_OK if attributes were filled in 37*10275SReed.Liu@Sun.COM * @param handle The desired HBA 38*10275SReed.Liu@Sun.COM * @param rval Return value 39*10275SReed.Liu@Sun.COM * 40*10275SReed.Liu@Sun.COM */ Sun_fcDoForceLip(HBA_HANDLE handle,int * rval)41*10275SReed.Liu@Sun.COMHBA_STATUS Sun_fcDoForceLip(HBA_HANDLE handle, 42*10275SReed.Liu@Sun.COM int *rval) { 43*10275SReed.Liu@Sun.COM Trace log("Sun_fcDoForceLip"); 44*10275SReed.Liu@Sun.COM 45*10275SReed.Liu@Sun.COM try { 46*10275SReed.Liu@Sun.COM Handle *myHandle = Handle::findHandle(handle); 47*10275SReed.Liu@Sun.COM *rval = myHandle->doForceLip(); 48*10275SReed.Liu@Sun.COM return (HBA_STATUS_OK); 49*10275SReed.Liu@Sun.COM } catch (HBAException &e) { 50*10275SReed.Liu@Sun.COM return (e.getErrorCode()); 51*10275SReed.Liu@Sun.COM } catch (...) { 52*10275SReed.Liu@Sun.COM log.internalError( 53*10275SReed.Liu@Sun.COM "Uncaught exception"); 54*10275SReed.Liu@Sun.COM return (HBA_STATUS_ERROR); 55*10275SReed.Liu@Sun.COM } 56*10275SReed.Liu@Sun.COM } 57*10275SReed.Liu@Sun.COM 58*10275SReed.Liu@Sun.COM #ifdef __cplusplus 59*10275SReed.Liu@Sun.COM } 60*10275SReed.Liu@Sun.COM #endif 61