95efa359b507db290a2484b8f615822b1e06096fEric Schrock * CDDL HEADER START
95efa359b507db290a2484b8f615822b1e06096fEric Schrock * The contents of this file are subject to the terms of the
95efa359b507db290a2484b8f615822b1e06096fEric Schrock * Common Development and Distribution License (the "License").
95efa359b507db290a2484b8f615822b1e06096fEric Schrock * You may not use this file except in compliance with the License.
95efa359b507db290a2484b8f615822b1e06096fEric Schrock * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
95efa359b507db290a2484b8f615822b1e06096fEric Schrock * See the License for the specific language governing permissions
95efa359b507db290a2484b8f615822b1e06096fEric Schrock * and limitations under the License.
95efa359b507db290a2484b8f615822b1e06096fEric Schrock * When distributing Covered Code, include this CDDL HEADER in each
95efa359b507db290a2484b8f615822b1e06096fEric Schrock * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
95efa359b507db290a2484b8f615822b1e06096fEric Schrock * If applicable, add the following below this CDDL HEADER, with the
95efa359b507db290a2484b8f615822b1e06096fEric Schrock * fields enclosed by brackets "[]" replaced with your own identifying
95efa359b507db290a2484b8f615822b1e06096fEric Schrock * information: Portions Copyright [yyyy] [name of copyright owner]
95efa359b507db290a2484b8f615822b1e06096fEric Schrock * CDDL HEADER END
95efa359b507db290a2484b8f615822b1e06096fEric Schrock * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
95efa359b507db290a2484b8f615822b1e06096fEric Schrock * Use is subject to license terms.
95efa359b507db290a2484b8f615822b1e06096fEric Schrockfmd_fmri_nvl2str(nvlist_t *nvl, char *buf, size_t buflen)
95efa359b507db290a2484b8f615822b1e06096fEric Schrock if ((thp = fmd_fmri_topo_hold(TOPO_VERSION)) == NULL)
95efa359b507db290a2484b8f615822b1e06096fEric Schrock if (topo_fmri_nvl2str(thp, nvl, &str, &err) != 0) {
95efa359b507db290a2484b8f615822b1e06096fEric Schrock if (nvlist_lookup_uint8(nvl, FM_VERSION, &version) != 0 ||
95efa359b507db290a2484b8f615822b1e06096fEric Schrock if ((thp = fmd_fmri_topo_hold(TOPO_VERSION)) == NULL)
95efa359b507db290a2484b8f615822b1e06096fEric Schrock if (nvlist_lookup_uint8(nvl, FM_VERSION, &version) != 0 ||
95efa359b507db290a2484b8f615822b1e06096fEric Schrock if ((thp = fmd_fmri_topo_hold(TOPO_VERSION)) == NULL)
95efa359b507db290a2484b8f615822b1e06096fEric Schrock if (nvlist_lookup_uint8(nvl, FM_VERSION, &version) != 0 ||
95efa359b507db290a2484b8f615822b1e06096fEric Schrock if ((thp = fmd_fmri_topo_hold(TOPO_VERSION)) == NULL)
95efa359b507db290a2484b8f615822b1e06096fEric Schrock service_state = topo_fmri_service_state(thp, nvl, &err);
95efa359b507db290a2484b8f615822b1e06096fEric Schrock if (nvlist_lookup_uint8(nvl, FM_VERSION, &version) != 0 ||