4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
30 #include <libnvpair.h>
32 #include <scsi/libses.h>
33 #include <scsi/libses_plugin.h>
34 #include <scsi/plugins/ses/framework/libses.h>
35 #include <scsi/plugins/ses/vendor/sun.h>
36 #include <scsi/plugins/ses/vendor/sun_impl.h>
39 sun_fruid_parse_common(sun_fru_descr_impl_t
*sfdip
, nvlist_t
*nvl
)
43 SES_NV_ADD(boolean_value
, nverr
, nvl
,
44 LIBSES_PROP_FRU
, sfdip
-> sfdi_fru
);
45 SES_NV_ADD(uint64
, nverr
, nvl
,
46 LIBSES_PROP_PHYS_PARENT
, sfdip
->sfdi_parent_element_index
);
52 sun_node_parse(ses_plugin_t
*sp
, ses_node_t
*np
)
54 switch (ses_node_type(np
)) {
55 case SES_NODE_ENCLOSURE
:
56 return (sun_fill_enclosure_node(sp
, np
));
58 case SES_NODE_AGGREGATE
:
59 case SES_NODE_ELEMENT
:
60 return (sun_fill_element_node(sp
, np
));
68 _ses_init(ses_plugin_t
*sp
)
70 ses_plugin_config_t config
= {
71 .spc_pages
= sun_pages
,
72 .spc_node_parse
= sun_node_parse
75 return (ses_plugin_register(sp
, LIBSES_PLUGIN_VERSION
,