raidcfg.h revision 3e4f2897f6618210c2ddb7529d87dc4395159768
/*
* 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
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _RAIDCFG_H
#define _RAIDCFG_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <raidcfg_spi.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Reserved Raid object IDs;
* ID 0 is reserved for root object;
* ID 0 also stands for NONE OBJECT.
*/
#define OBJ_SYSTEM 0
#define OBJ_NONE 0
typedef int raid_obj_handle_t;
/*
* API data structure definition
*/
typedef struct {
int array_handle;
int disk_handle;
typedef controller_attr_t raidcfg_controller_t;
typedef array_attr_t raidcfg_array_t;
typedef disk_attr_t raidcfg_disk_t;
typedef struct {
typedef struct {
typedef diskseg_attr_t raidcfg_diskseg_t;
typedef task_attr_t raidcfg_task_t;
/*
* raidcfg common library APIs
*/
const char *raidcfg_errstr(int);
int raidcfg_get_disk(int, disk_tag_t);
int raidcfg_open_controller(int, char **);
int raidcfg_close_controller(int, char **);
int raidcfg_get_type(int);
int raidcfg_get_attr(int, void *);
int raidcfg_get_container(int);
int raidcfg_list_head(int, raid_obj_type_id_t);
int raidcfg_list_next(int);
int raidcfg_set_attr(int, uint32_t, void *, char **);
int raidcfg_set_hsp(int, raidcfg_hsp_relation_t *, char **);
int raidcfg_unset_hsp(int, raidcfg_hsp_relation_t *, char **);
int raidcfg_delete_array(int, char **);
int raidcfg_update_fw(int, char *, char **);
#ifdef __cplusplus
}
#endif
#endif /* _RAIDCFG_H */