disk_discovery.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "mdescplugin.h"
static char *device_format_disk_name(char *devfs_path);
/* These 3 variable are defined and set in mdescplugin.c */
extern picl_nodehdl_t root_node;
extern mde_cookie_t rootnode;
/* This routine is defined in cpu_prop_update.c */
int type);
int
disk_discovery(void)
{
int status = PICL_FAILURE;
return (status);
}
/*
* Starting at the root node, scan the "fwd" dag for
* all the disks in this description.
*/
if (ndisks <= 0) {
return (status);
}
if (status != PICL_SUCCESS)
return (status);
for (x = 0; x < ndisks; x++) {
&dev_path) != 0) {
continue;
}
&nac) != 0) {
continue;
}
continue;
}
continue;
}
switch (disk_data->ap_o_state) {
case CFGA_STAT_UNCONFIGURED:
break;
case CFGA_STAT_CONFIGURED:
break;
default:
break;
}
}
return (status);
}
static cfga_list_data_t *
device_get_disk_cfga_info(char *cfgpath)
{
char **apid_names;
char apid_name[CFGA_AP_LOG_ID_LEN];
struct cfga_list_data *list_data;
apid_names[0] = apid_name;
return (NULL);
}
/* free any extra entries if this is not unique */
if (list_len > 1) {
}
}
return (&list_data[0]);
}
static char *
{
char devname[256];
char apid_name[CFGA_AP_LOG_ID_LEN];
}
return (NULL);
}
/*
* Getting a disk name is annoying. Walking controllers
* doesn't work if disks were added out of order (ie a new
* controller card was installed), and DKIO controller numbers
* seem to always be 0. So we do it the old fashioned way:
*
* We get a target name (in the /devices tree), and we want
* automatically, we just compare the device and inode numbers
* to the device and inode numbers of the target. According to
* the stat man page, this constitues a unique match. The only
* little cleanup is that this includes a slice #, which we take
* off.
*/
static char *
{
int loc_err;
char *ptr;
if (loc_err < 0) {
return (NULL);
}
return (NULL);
}
if (loc_err == 0) {
sizeof (ino_t)) == 0) &&
sizeof (dev_t)) == 0)) {
return (ptr);
}
}
}
return (NULL);
}