spa_boot.c revision b24ab6762772a3f6a89393947930c7fa61306783
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw/*
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw * CDDL HEADER START
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw *
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw * The contents of this file are subject to the terms of the
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw * Common Development and Distribution License (the "License").
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw * You may not use this file except in compliance with the License.
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw *
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw * or http://www.opensolaris.org/os/licensing.
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw * See the License for the specific language governing permissions
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw * and limitations under the License.
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw *
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw * When distributing Covered Code, include this CDDL HEADER in each
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw * If applicable, add the following below this CDDL HEADER, with the
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw * fields enclosed by brackets "[]" replaced with your own identifying
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw * information: Portions Copyright [yyyy] [name of copyright owner]
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw *
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw * CDDL HEADER END
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw */
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw/*
b24ab6762772a3f6a89393947930c7fa61306783Jeff Bonwick * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw * Use is subject to license terms.
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw */
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw
b24ab6762772a3f6a89393947930c7fa61306783Jeff Bonwick#include <sys/zio.h>
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw#include <sys/spa.h>
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw#include <sys/sunddi.h>
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gwchar *
051aabe6136ff13e81542a427e9693ffe1503525taylorspa_get_bootprop(char *propname)
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw{
051aabe6136ff13e81542a427e9693ffe1503525taylor char *value;
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw if (ddi_prop_lookup_string(DDI_DEV_T_ANY, ddi_root_node(),
051aabe6136ff13e81542a427e9693ffe1503525taylor DDI_PROP_DONTPASS, propname, &value) != DDI_SUCCESS)
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw return (NULL);
051aabe6136ff13e81542a427e9693ffe1503525taylor return (value);
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw}
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gwvoid
051aabe6136ff13e81542a427e9693ffe1503525taylorspa_free_bootprop(char *value)
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw{
051aabe6136ff13e81542a427e9693ffe1503525taylor ddi_prop_free(value);
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw}