17836SJohn.Forte@Sun.COM /*
27836SJohn.Forte@Sun.COM * CDDL HEADER START
37836SJohn.Forte@Sun.COM *
47836SJohn.Forte@Sun.COM * The contents of this file are subject to the terms of the
57836SJohn.Forte@Sun.COM * Common Development and Distribution License (the "License").
67836SJohn.Forte@Sun.COM * You may not use this file except in compliance with the License.
77836SJohn.Forte@Sun.COM *
87836SJohn.Forte@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97836SJohn.Forte@Sun.COM * or http://www.opensolaris.org/os/licensing.
107836SJohn.Forte@Sun.COM * See the License for the specific language governing permissions
117836SJohn.Forte@Sun.COM * and limitations under the License.
127836SJohn.Forte@Sun.COM *
137836SJohn.Forte@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each
147836SJohn.Forte@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157836SJohn.Forte@Sun.COM * If applicable, add the following below this CDDL HEADER, with the
167836SJohn.Forte@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying
177836SJohn.Forte@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner]
187836SJohn.Forte@Sun.COM *
197836SJohn.Forte@Sun.COM * CDDL HEADER END
207836SJohn.Forte@Sun.COM */
217836SJohn.Forte@Sun.COM /*
22*12334SJiri.Svoboda@Sun.COM * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
237836SJohn.Forte@Sun.COM */
247836SJohn.Forte@Sun.COM
257836SJohn.Forte@Sun.COM #include <string.h>
267836SJohn.Forte@Sun.COM #include <syslog.h>
277836SJohn.Forte@Sun.COM #include <errno.h>
287836SJohn.Forte@Sun.COM #include <unistd.h>
297836SJohn.Forte@Sun.COM #include <stropts.h>
307836SJohn.Forte@Sun.COM
317836SJohn.Forte@Sun.COM #include <libdevinfo.h>
327836SJohn.Forte@Sun.COM
337836SJohn.Forte@Sun.COM #include "mp_utils.h"
347836SJohn.Forte@Sun.COM
357836SJohn.Forte@Sun.COM
367836SJohn.Forte@Sun.COM typedef struct walk_devlink {
377836SJohn.Forte@Sun.COM char *path;
387836SJohn.Forte@Sun.COM size_t len;
397836SJohn.Forte@Sun.COM char **linkpp;
407836SJohn.Forte@Sun.COM } walk_devlink_t;
417836SJohn.Forte@Sun.COM
427836SJohn.Forte@Sun.COM
437836SJohn.Forte@Sun.COM
447836SJohn.Forte@Sun.COM static int
get_devlink(di_devlink_t devlink,void * arg)457836SJohn.Forte@Sun.COM get_devlink(di_devlink_t devlink, void *arg) {
467836SJohn.Forte@Sun.COM
477836SJohn.Forte@Sun.COM walk_devlink_t *warg = (walk_devlink_t *)arg;
487836SJohn.Forte@Sun.COM
497836SJohn.Forte@Sun.COM
507836SJohn.Forte@Sun.COM log(LOG_INFO, "get_devlink()", " - enter");
517836SJohn.Forte@Sun.COM
527836SJohn.Forte@Sun.COM
537836SJohn.Forte@Sun.COM *(warg->linkpp) = strdup(di_devlink_path(devlink));
547836SJohn.Forte@Sun.COM
557836SJohn.Forte@Sun.COM
567836SJohn.Forte@Sun.COM log(LOG_INFO, "get_devlink()", " - exit");
577836SJohn.Forte@Sun.COM
587836SJohn.Forte@Sun.COM return (DI_WALK_TERMINATE);
597836SJohn.Forte@Sun.COM }
607836SJohn.Forte@Sun.COM
617836SJohn.Forte@Sun.COM
627836SJohn.Forte@Sun.COM char
getDeviceFileName(MP_UINT64 objectSequenceNumber)63*12334SJiri.Svoboda@Sun.COM *getDeviceFileName(MP_UINT64 objectSequenceNumber)
647836SJohn.Forte@Sun.COM {
657836SJohn.Forte@Sun.COM char *deviceFileName = NULL;
667836SJohn.Forte@Sun.COM
677836SJohn.Forte@Sun.COM di_node_t root_node = DI_NODE_NIL;
687836SJohn.Forte@Sun.COM di_node_t cur_node = DI_NODE_NIL;
697836SJohn.Forte@Sun.COM
70*12334SJiri.Svoboda@Sun.COM int instNum;
71*12334SJiri.Svoboda@Sun.COM int majorNum;
72*12334SJiri.Svoboda@Sun.COM MP_UINT64 osn;
737836SJohn.Forte@Sun.COM
747836SJohn.Forte@Sun.COM char *pathName = NULL;
757836SJohn.Forte@Sun.COM char *minorName = "c,raw";
767836SJohn.Forte@Sun.COM char *devLink = NULL;
777836SJohn.Forte@Sun.COM
787836SJohn.Forte@Sun.COM char fullName[512];
797836SJohn.Forte@Sun.COM
807836SJohn.Forte@Sun.COM walk_devlink_t warg;
817836SJohn.Forte@Sun.COM di_devlink_handle_t dlHandle = NULL;
827836SJohn.Forte@Sun.COM
837836SJohn.Forte@Sun.COM int diStatus = 0;
847836SJohn.Forte@Sun.COM
857836SJohn.Forte@Sun.COM
867836SJohn.Forte@Sun.COM log(LOG_INFO, "getDeviceFileName()", " - enter");
877836SJohn.Forte@Sun.COM
887836SJohn.Forte@Sun.COM log(LOG_INFO, "getDeviceFileName()",
89*12334SJiri.Svoboda@Sun.COM " - objectSequenceNumber: %llx",
90*12334SJiri.Svoboda@Sun.COM objectSequenceNumber);
917836SJohn.Forte@Sun.COM
927836SJohn.Forte@Sun.COM root_node = di_init("/", DINFOCACHE);
937836SJohn.Forte@Sun.COM if (DI_NODE_NIL == root_node) {
947836SJohn.Forte@Sun.COM log(LOG_INFO, "MP_GetMultipathLusPlugin()",
958950SRamesh.Chitrothu@Sun.COM " - $ERROR, di_init() failed");
967836SJohn.Forte@Sun.COM
977836SJohn.Forte@Sun.COM return (NULL);
987836SJohn.Forte@Sun.COM }
997836SJohn.Forte@Sun.COM
1007836SJohn.Forte@Sun.COM
1017836SJohn.Forte@Sun.COM cur_node = di_drv_first_node("scsi_vhci", root_node);
1027836SJohn.Forte@Sun.COM if (DI_NODE_NIL == cur_node) {
1037836SJohn.Forte@Sun.COM log(LOG_INFO, "getDeviceFileName()",
1048950SRamesh.Chitrothu@Sun.COM " - $ERROR, di_drv_first_node() failed");
1057836SJohn.Forte@Sun.COM
1067836SJohn.Forte@Sun.COM di_fini(root_node);
1077836SJohn.Forte@Sun.COM
1087836SJohn.Forte@Sun.COM return (NULL);
1097836SJohn.Forte@Sun.COM }
1107836SJohn.Forte@Sun.COM
1117836SJohn.Forte@Sun.COM
1127836SJohn.Forte@Sun.COM cur_node = di_child_node(cur_node);
1137836SJohn.Forte@Sun.COM
1147836SJohn.Forte@Sun.COM while (DI_NODE_NIL != cur_node) {
1157836SJohn.Forte@Sun.COM
116*12334SJiri.Svoboda@Sun.COM instNum = di_instance(cur_node);
117*12334SJiri.Svoboda@Sun.COM majorNum = di_driver_major(cur_node);
1187836SJohn.Forte@Sun.COM
119*12334SJiri.Svoboda@Sun.COM osn = 0;
120*12334SJiri.Svoboda@Sun.COM osn = MP_STORE_INST_TO_ID(instNum, osn);
121*12334SJiri.Svoboda@Sun.COM osn = MP_STORE_MAJOR_TO_ID(majorNum, osn);
122*12334SJiri.Svoboda@Sun.COM
123*12334SJiri.Svoboda@Sun.COM if (osn == objectSequenceNumber) {
1247836SJohn.Forte@Sun.COM
1257836SJohn.Forte@Sun.COM log(LOG_INFO, "getDeviceFileName()",
1268950SRamesh.Chitrothu@Sun.COM " - found node.");
1277836SJohn.Forte@Sun.COM
1287836SJohn.Forte@Sun.COM break;
1297836SJohn.Forte@Sun.COM }
1307836SJohn.Forte@Sun.COM
1317836SJohn.Forte@Sun.COM cur_node = di_sibling_node(cur_node);
1327836SJohn.Forte@Sun.COM }
1337836SJohn.Forte@Sun.COM
1347836SJohn.Forte@Sun.COM if (DI_NODE_NIL != cur_node) {
1357836SJohn.Forte@Sun.COM
1367836SJohn.Forte@Sun.COM dlHandle = di_devlink_init(NULL, 0);
1377836SJohn.Forte@Sun.COM if (NULL == dlHandle) {
1388950SRamesh.Chitrothu@Sun.COM log(LOG_INFO, "getDeviceFileName()",
1397836SJohn.Forte@Sun.COM " - $ERROR, di_devlink_init() failed.");
1407836SJohn.Forte@Sun.COM
1418950SRamesh.Chitrothu@Sun.COM di_fini(root_node);
1427836SJohn.Forte@Sun.COM
1438950SRamesh.Chitrothu@Sun.COM return (NULL);
1447836SJohn.Forte@Sun.COM }
1457836SJohn.Forte@Sun.COM
1467836SJohn.Forte@Sun.COM pathName = di_devfs_path(cur_node);
1477836SJohn.Forte@Sun.COM
1487836SJohn.Forte@Sun.COM (void) snprintf(fullName, 511, "%s:%s", pathName, minorName);
1497836SJohn.Forte@Sun.COM
1507836SJohn.Forte@Sun.COM log(LOG_INFO, "getDeviceFileName()",
1518950SRamesh.Chitrothu@Sun.COM " - fullName: {%s]", fullName);
1527836SJohn.Forte@Sun.COM
1537836SJohn.Forte@Sun.COM (void) memset(&warg, 0, sizeof (walk_devlink_t));
1547836SJohn.Forte@Sun.COM
1557836SJohn.Forte@Sun.COM devLink = NULL;
1567836SJohn.Forte@Sun.COM warg.linkpp = &devLink;
1577836SJohn.Forte@Sun.COM
1587836SJohn.Forte@Sun.COM diStatus = di_devlink_walk(dlHandle,
1598950SRamesh.Chitrothu@Sun.COM NULL,
1608950SRamesh.Chitrothu@Sun.COM fullName,
1618950SRamesh.Chitrothu@Sun.COM DI_PRIMARY_LINK,
1628950SRamesh.Chitrothu@Sun.COM (void *)&warg,
1638950SRamesh.Chitrothu@Sun.COM get_devlink);
1647836SJohn.Forte@Sun.COM
1657836SJohn.Forte@Sun.COM if (diStatus != 0) {
1667836SJohn.Forte@Sun.COM
1677836SJohn.Forte@Sun.COM log(LOG_INFO, "getDeviceFileName()",
1687836SJohn.Forte@Sun.COM "diStatus: %d", diStatus);
1697836SJohn.Forte@Sun.COM
1707836SJohn.Forte@Sun.COM if (diStatus < 0) {
1717836SJohn.Forte@Sun.COM diStatus = errno;
1727836SJohn.Forte@Sun.COM }
1737836SJohn.Forte@Sun.COM
1747836SJohn.Forte@Sun.COM log(LOG_INFO, "getDeviceFileName()",
1757836SJohn.Forte@Sun.COM "diStatus: %d", diStatus);
1767836SJohn.Forte@Sun.COM
1777836SJohn.Forte@Sun.COM log(LOG_INFO, "getDeviceFileName()",
1787836SJohn.Forte@Sun.COM "strerror(diStatus): %s", strerror(diStatus));
1797836SJohn.Forte@Sun.COM }
1807836SJohn.Forte@Sun.COM
1817836SJohn.Forte@Sun.COM if (NULL != devLink) {
1827836SJohn.Forte@Sun.COM
1837836SJohn.Forte@Sun.COM deviceFileName =
1848950SRamesh.Chitrothu@Sun.COM (char *)calloc(1, strlen(devLink) + 1);
1857836SJohn.Forte@Sun.COM
1867836SJohn.Forte@Sun.COM (void) strncpy(deviceFileName, devLink,
1877836SJohn.Forte@Sun.COM strlen(devLink));
1887836SJohn.Forte@Sun.COM
1897836SJohn.Forte@Sun.COM } else {
1907836SJohn.Forte@Sun.COM
1917836SJohn.Forte@Sun.COM log(LOG_INFO, "getDeviceFileName()",
1928950SRamesh.Chitrothu@Sun.COM " - $ERROR, devLink is NULL.");
1937836SJohn.Forte@Sun.COM
1947836SJohn.Forte@Sun.COM deviceFileName =
1958950SRamesh.Chitrothu@Sun.COM (char *)calloc(1, 256);
1967836SJohn.Forte@Sun.COM
1977836SJohn.Forte@Sun.COM (void) strncpy(deviceFileName, pathName, 255);
1987836SJohn.Forte@Sun.COM }
1997836SJohn.Forte@Sun.COM
2007836SJohn.Forte@Sun.COM di_devfs_path_free(pathName);
2017836SJohn.Forte@Sun.COM
2027836SJohn.Forte@Sun.COM (void) di_devlink_fini(&dlHandle);
2037836SJohn.Forte@Sun.COM
2047836SJohn.Forte@Sun.COM }
2057836SJohn.Forte@Sun.COM
2067836SJohn.Forte@Sun.COM
2077836SJohn.Forte@Sun.COM di_fini(root_node);
2087836SJohn.Forte@Sun.COM
2098950SRamesh.Chitrothu@Sun.COM free(devLink);
2107836SJohn.Forte@Sun.COM
2117836SJohn.Forte@Sun.COM log(LOG_INFO, "getDeviceFileName()", " - exit");
2127836SJohn.Forte@Sun.COM
2137836SJohn.Forte@Sun.COM return (deviceFileName);
2147836SJohn.Forte@Sun.COM }
2157836SJohn.Forte@Sun.COM
2167836SJohn.Forte@Sun.COM
2177836SJohn.Forte@Sun.COM
2187836SJohn.Forte@Sun.COM MP_STATUS
MP_GetMPLogicalUnitProperties(MP_OID oid,MP_MULTIPATH_LOGICAL_UNIT_PROPERTIES * pProps)2197836SJohn.Forte@Sun.COM MP_GetMPLogicalUnitProperties(MP_OID oid,
2207836SJohn.Forte@Sun.COM MP_MULTIPATH_LOGICAL_UNIT_PROPERTIES *pProps)
2217836SJohn.Forte@Sun.COM {
2227836SJohn.Forte@Sun.COM mp_iocdata_t mp_ioctl;
2237836SJohn.Forte@Sun.COM mp_logical_unit_prop_t luInfo;
2247836SJohn.Forte@Sun.COM
2257836SJohn.Forte@Sun.COM MP_OID overridePathOID;
2267836SJohn.Forte@Sun.COM
2277836SJohn.Forte@Sun.COM int ioctlStatus = 0;
2287836SJohn.Forte@Sun.COM
2297836SJohn.Forte@Sun.COM int vendorLength = 0;
2307836SJohn.Forte@Sun.COM int productLength = 0;
2317836SJohn.Forte@Sun.COM int revisionLength = 0;
2327836SJohn.Forte@Sun.COM
2337836SJohn.Forte@Sun.COM char *deviceFileName = NULL;
2347836SJohn.Forte@Sun.COM
2357836SJohn.Forte@Sun.COM
2367836SJohn.Forte@Sun.COM MP_STATUS mpStatus = MP_STATUS_SUCCESS;
2377836SJohn.Forte@Sun.COM
2387836SJohn.Forte@Sun.COM
2397836SJohn.Forte@Sun.COM log(LOG_INFO, "MP_GetMPLogicalUnitProperties()", " - enter");
2407836SJohn.Forte@Sun.COM
2417836SJohn.Forte@Sun.COM
2427836SJohn.Forte@Sun.COM log(LOG_INFO, "MP_GetMPLogicalUnitProperties()",
2438950SRamesh.Chitrothu@Sun.COM "oid.objectSequenceNumber = %llx",
2448950SRamesh.Chitrothu@Sun.COM oid.objectSequenceNumber);
2457836SJohn.Forte@Sun.COM
2467836SJohn.Forte@Sun.COM if (g_scsi_vhci_fd < 0) {
2477836SJohn.Forte@Sun.COM log(LOG_INFO, "MP_GetMPLogicalUnitProperties()",
2488950SRamesh.Chitrothu@Sun.COM "invalid driver file handle");
2497836SJohn.Forte@Sun.COM log(LOG_INFO, "MP_GetMPLogicalUnitProperties()",
2508950SRamesh.Chitrothu@Sun.COM " - error exit");
2517836SJohn.Forte@Sun.COM return (MP_STATUS_FAILED);
2527836SJohn.Forte@Sun.COM }
2537836SJohn.Forte@Sun.COM
2547836SJohn.Forte@Sun.COM (void) memset(&mp_ioctl, 0, sizeof (mp_iocdata_t));
2557836SJohn.Forte@Sun.COM (void) memset(&luInfo, 0, sizeof (mp_logical_unit_prop_t));
2567836SJohn.Forte@Sun.COM
2577836SJohn.Forte@Sun.COM mp_ioctl.mp_cmd = MP_GET_LU_PROP;
2587836SJohn.Forte@Sun.COM mp_ioctl.mp_ibuf = (caddr_t)&oid.objectSequenceNumber;
2597836SJohn.Forte@Sun.COM mp_ioctl.mp_ilen = sizeof (oid.objectSequenceNumber);
2607836SJohn.Forte@Sun.COM mp_ioctl.mp_obuf = (caddr_t)&luInfo;
2617836SJohn.Forte@Sun.COM mp_ioctl.mp_olen = sizeof (mp_logical_unit_prop_t);
2627836SJohn.Forte@Sun.COM mp_ioctl.mp_xfer = MP_XFER_READ;
2637836SJohn.Forte@Sun.COM
2647836SJohn.Forte@Sun.COM ioctlStatus = ioctl(g_scsi_vhci_fd, MP_CMD, &mp_ioctl);
2657836SJohn.Forte@Sun.COM
2667836SJohn.Forte@Sun.COM log(LOG_INFO, "MP_GetMPLogicalUnitProperties()",
2678950SRamesh.Chitrothu@Sun.COM " IOCTL call returned: %d", ioctlStatus);
2687836SJohn.Forte@Sun.COM
2697836SJohn.Forte@Sun.COM if (ioctlStatus < 0) {
2707836SJohn.Forte@Sun.COM ioctlStatus = errno;
2717836SJohn.Forte@Sun.COM }
2727836SJohn.Forte@Sun.COM
2737836SJohn.Forte@Sun.COM if (ioctlStatus != 0) {
2747836SJohn.Forte@Sun.COM log(LOG_INFO, "MP_GetMPLogicalUnitProperties()",
2758950SRamesh.Chitrothu@Sun.COM "IOCTL call failed. IOCTL error is: %d",
2768950SRamesh.Chitrothu@Sun.COM ioctlStatus);
2777836SJohn.Forte@Sun.COM log(LOG_INFO, "MP_GetMPLogicalUnitProperties()",
2788950SRamesh.Chitrothu@Sun.COM "IOCTL call failed. IOCTL error is: %s",
2798950SRamesh.Chitrothu@Sun.COM strerror(ioctlStatus));
2807836SJohn.Forte@Sun.COM log(LOG_INFO, "MP_GetMPLogicalUnitProperties()",
2818950SRamesh.Chitrothu@Sun.COM "IOCTL call failed. mp_ioctl.mp_errno: %x",
2828950SRamesh.Chitrothu@Sun.COM mp_ioctl.mp_errno);
2837836SJohn.Forte@Sun.COM
2847836SJohn.Forte@Sun.COM if (ENOTSUP == ioctlStatus) {
2857836SJohn.Forte@Sun.COM mpStatus = MP_STATUS_UNSUPPORTED;
2867836SJohn.Forte@Sun.COM } else if (0 == mp_ioctl.mp_errno) {
2877836SJohn.Forte@Sun.COM mpStatus = MP_STATUS_FAILED;
2887836SJohn.Forte@Sun.COM } else {
2897836SJohn.Forte@Sun.COM mpStatus = getStatus4ErrorCode(mp_ioctl.mp_errno);
2907836SJohn.Forte@Sun.COM }
2917836SJohn.Forte@Sun.COM
2927836SJohn.Forte@Sun.COM log(LOG_INFO, "MP_GetMPLogicalUnitProperties()",
2938950SRamesh.Chitrothu@Sun.COM " - error exit");
2947836SJohn.Forte@Sun.COM
2957836SJohn.Forte@Sun.COM return (mpStatus);
2967836SJohn.Forte@Sun.COM }
2977836SJohn.Forte@Sun.COM
2987836SJohn.Forte@Sun.COM (void) memset(pProps, 0, sizeof (MP_MULTIPATH_LOGICAL_UNIT_PROPERTIES));
2997836SJohn.Forte@Sun.COM
3007836SJohn.Forte@Sun.COM pProps->asymmetric = luInfo.asymmetric;
3017836SJohn.Forte@Sun.COM pProps->autoFailbackEnabled = luInfo.autoFailbackEnabled;
3027836SJohn.Forte@Sun.COM pProps->autoProbingEnabled = luInfo.autoProbingEnabled;
3037836SJohn.Forte@Sun.COM pProps->currentFailbackPollingRate = luInfo.currentFailBackPollingRate;
3047836SJohn.Forte@Sun.COM pProps->currentLoadBalanceType = luInfo.currentLoadBalanceType;
3057836SJohn.Forte@Sun.COM pProps->currentProbingPollingRate = luInfo.currentProbingPollingRate;
3067836SJohn.Forte@Sun.COM
3077836SJohn.Forte@Sun.COM
3087836SJohn.Forte@Sun.COM deviceFileName = getDeviceFileName(oid.objectSequenceNumber);
3097836SJohn.Forte@Sun.COM
3107836SJohn.Forte@Sun.COM if (NULL != deviceFileName) {
3117836SJohn.Forte@Sun.COM
3127836SJohn.Forte@Sun.COM log(LOG_INFO, "MP_GetMPLogicalUnitProperties()",
3138950SRamesh.Chitrothu@Sun.COM "deviceFileName: %s",
3148950SRamesh.Chitrothu@Sun.COM deviceFileName);
3157836SJohn.Forte@Sun.COM
3167836SJohn.Forte@Sun.COM (void) strncpy(pProps->deviceFileName,
3178950SRamesh.Chitrothu@Sun.COM deviceFileName,
3188950SRamesh.Chitrothu@Sun.COM sizeof (pProps->deviceFileName) - 1);
3197836SJohn.Forte@Sun.COM
3207836SJohn.Forte@Sun.COM free(deviceFileName);
3217836SJohn.Forte@Sun.COM }
3227836SJohn.Forte@Sun.COM
3237836SJohn.Forte@Sun.COM pProps->failbackPollingRateMax = luInfo.failbackPollingRateMax;
3247836SJohn.Forte@Sun.COM pProps->logicalUnitGroupID = luInfo.luGroupID;
3257836SJohn.Forte@Sun.COM
3267836SJohn.Forte@Sun.COM (void) strncpy(pProps->name, luInfo.name, sizeof (pProps->name) - 1);
3277836SJohn.Forte@Sun.COM
3287836SJohn.Forte@Sun.COM pProps->nameType = luInfo.nameType;
3297836SJohn.Forte@Sun.COM
3307836SJohn.Forte@Sun.COM overridePathOID.objectSequenceNumber = luInfo.overridePathID;
3317836SJohn.Forte@Sun.COM overridePathOID.objectType = MP_OBJECT_TYPE_PATH_LU;
3327836SJohn.Forte@Sun.COM overridePathOID.ownerId = g_pluginOwnerID;
3337836SJohn.Forte@Sun.COM (void) memcpy(&pProps->overridePath, &overridePathOID, sizeof (MP_OID));
3347836SJohn.Forte@Sun.COM
3357836SJohn.Forte@Sun.COM pProps->probingPollingRateMax = luInfo.probingPollingRateMax;
3367836SJohn.Forte@Sun.COM
3377836SJohn.Forte@Sun.COM
3387836SJohn.Forte@Sun.COM vendorLength = sizeof (pProps->vendor);
3397836SJohn.Forte@Sun.COM productLength = sizeof (pProps->product);
3407836SJohn.Forte@Sun.COM revisionLength = sizeof (pProps->revision);
3417836SJohn.Forte@Sun.COM
3427836SJohn.Forte@Sun.COM (void) strncpy(pProps->vendor,
3438950SRamesh.Chitrothu@Sun.COM luInfo.prodInfo.vendor,
3448950SRamesh.Chitrothu@Sun.COM vendorLength);
3457836SJohn.Forte@Sun.COM
3467836SJohn.Forte@Sun.COM (void) strncpy(pProps->product,
3478950SRamesh.Chitrothu@Sun.COM luInfo.prodInfo.product,
3488950SRamesh.Chitrothu@Sun.COM productLength);
3497836SJohn.Forte@Sun.COM
3507836SJohn.Forte@Sun.COM (void) strncpy(pProps->revision,
3518950SRamesh.Chitrothu@Sun.COM luInfo.prodInfo.revision,
3528950SRamesh.Chitrothu@Sun.COM revisionLength);
3537836SJohn.Forte@Sun.COM
3547836SJohn.Forte@Sun.COM log(LOG_INFO, "MP_GetMPLogicalUnitProperties()", " - exit");
3557836SJohn.Forte@Sun.COM
3567836SJohn.Forte@Sun.COM return (MP_STATUS_SUCCESS);
3577836SJohn.Forte@Sun.COM }
358