/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#include <fcntl.h>
#include <libdevinfo.h>
#include <stdlib.h>
#include "libdiskmgt.h"
#include "disks_private.h"
descriptor_t **
{
switch (type) {
case DM_DRIVE:
case DM_CONTROLLER:
}
return (NULL);
}
nvlist_t *
{
return (NULL);
}
return (NULL);
}
/*
* We add the path state and wwn attributes only for descriptors that
* we got via their association to a specific drive (since these
* attributes are drive specific).
*/
return (NULL);
}
return (NULL);
}
}
*errp = 0;
return (attrs);
}
{
int i;
if (*errp != 0) {
return (NULL);
}
for (i = 0; paths[i]; i++) {
} else {
/* clean up the unused descriptors */
}
}
}
return (path);
}
/* ARGSUSED */
descriptor_t **
{
}
char *
{
}
/* ARGSUSED */
nvlist_t *
{
/* There are no stat types defined for paths */
return (NULL);
}
int
{
int error = 0;
int locked;
int i;
if (error != 0)
break;
}
}
}
return (error);
}
/*
* This is called when we have a name in the descriptor name field. That
* only will be the case when the descriptor was created by getting the
* association from a drive to the path. Since we filled in the name with
* the drive device id in that case, we can use the device id to look up the
* drive-path state.
*/
static int
{
int i;
int status = 0;
return (0);
}
/* find the index of the correct drive assoc. */
/* add the corresponding state */
}
break;
}
}
return (status);
}
/*
* This is called when we have a name in the descriptor name field. That
* only will be the case when the descriptor was created by getting the
* association from a drive to the path. Since we filled in the name with
* the drive device id in that case, we can use the device id to look up the
* drive wwn.
*/
static int
{
int i;
int status = 0;
return (0);
}
/* find the index of the correct drive assoc. */
/* add the corresponding state */
}
break;
}
}
return (status);
}
static descriptor_t **
{
int i;
/* a path can have just one controller */
if (controllers == NULL) {
return (NULL);
}
i = 0;
if (*errp != 0) {
return (NULL);
}
}
controllers[i] = NULL;
*errp = 0;
return (controllers);
}
static descriptor_t **
{
int cnt;
int i;
/* Count how many we have. */
/* make the snapshot */
return (NULL);
}
errp);
if (*errp != 0) {
return (NULL);
}
}
*errp = 0;
return (drives);
}
static char *
{
switch (st) {
case DI_PATH_STATE_ONLINE:
return ("online");
case DI_PATH_STATE_STANDBY:
return ("standby");
case DI_PATH_STATE_OFFLINE:
return ("offline");
case DI_PATH_STATE_FAULT:
return ("faulted");
}
return ("unknown");
}