fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMP_GetProprietaryLoadBalanceProperties(MP_OID oid,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte log(LOG_INFO, "MP_GetProprietaryLoadBalanceProperties()", " - enter");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte log(LOG_INFO, "MP_GetProprietaryLoadBalanceProperties()",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "oid.objectSequenceNumber = %llx",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte log(LOG_INFO, "MP_GetProprietaryLoadBalanceProperties()",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "invalid driver file handle");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte log(LOG_INFO, "MP_GetProprietaryLoadBalanceProperties",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte " - error exit");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (void) memset(&mp_ioctl, 0, sizeof (mp_iocdata_t));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (void) memset(&lbProps, 0, sizeof (mp_proprietary_loadbalance_prop_t));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mp_ioctl.mp_cmd = MP_GET_PROPRIETARY_LOADBALANCE_PROP;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mp_ioctl.mp_ibuf = (caddr_t)&oid.objectSequenceNumber;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mp_ioctl.mp_ilen = sizeof (oid.objectSequenceNumber);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mp_ioctl.mp_olen = sizeof (mp_proprietary_loadbalance_prop_t);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ioctlStatus = ioctl(g_scsi_vhci_fd, MP_CMD, &mp_ioctl);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte log(LOG_INFO, "MP_GetProprietaryLoadBalanceProperties()",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte log(LOG_INFO, "MP_GetProprietaryLoadBalanceProperties()",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IOCTL call failed. IOCTL error is: %d",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte log(LOG_INFO, "MP_GetProprietaryLoadBalanceProperties()",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IOCTL call failed. IOCTL error is: %s",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte log(LOG_INFO, "MP_GetProprietaryLoadBalanceProperties()",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IOCTL call failed. mp_ioctl.mp_errno: %x",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mpStatus = getStatus4ErrorCode(mp_ioctl.mp_errno);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte log(LOG_INFO, "MP_GetProprietaryLoadBalanceProperties()",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte " - error exit");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sizeof (MP_PROPRIETARY_LOAD_BALANCE_PROPERTIES));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (void) mbstowcs(pProps->name, lbProps.name, 256);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * pProps->proprietaryPropertyCount &
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * pProps->proprietaryProperties
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * when they are available
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (void) mbstowcs(pProps->vendorName, lbProps.vendorName, 256);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte log(LOG_INFO, "MP_GetProprietaryLoadBalanceProperties()", " - exit");