xref: /onnv-gate/usr/src/uts/intel/zfs/spa_boot.c (revision 10922:e2081f502306)
16423Sgw25295 /*
26423Sgw25295  * CDDL HEADER START
36423Sgw25295  *
46423Sgw25295  * The contents of this file are subject to the terms of the
56423Sgw25295  * Common Development and Distribution License (the "License").
66423Sgw25295  * You may not use this file except in compliance with the License.
76423Sgw25295  *
86423Sgw25295  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
96423Sgw25295  * or http://www.opensolaris.org/os/licensing.
106423Sgw25295  * See the License for the specific language governing permissions
116423Sgw25295  * and limitations under the License.
126423Sgw25295  *
136423Sgw25295  * When distributing Covered Code, include this CDDL HEADER in each
146423Sgw25295  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
156423Sgw25295  * If applicable, add the following below this CDDL HEADER, with the
166423Sgw25295  * fields enclosed by brackets "[]" replaced with your own identifying
176423Sgw25295  * information: Portions Copyright [yyyy] [name of copyright owner]
186423Sgw25295  *
196423Sgw25295  * CDDL HEADER END
206423Sgw25295  */
216423Sgw25295 
226423Sgw25295 /*
23*10922SJeff.Bonwick@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
246423Sgw25295  * Use is subject to license terms.
256423Sgw25295  */
266423Sgw25295 
27*10922SJeff.Bonwick@Sun.COM #include <sys/zio.h>
286423Sgw25295 #include <sys/spa.h>
296423Sgw25295 #include <sys/sunddi.h>
306423Sgw25295 
316423Sgw25295 char *
spa_get_bootprop(char * propname)327147Staylor spa_get_bootprop(char *propname)
336423Sgw25295 {
347147Staylor 	char *value;
356423Sgw25295 
366423Sgw25295 	if (ddi_prop_lookup_string(DDI_DEV_T_ANY, ddi_root_node(),
377147Staylor 	    DDI_PROP_DONTPASS, propname, &value) != DDI_SUCCESS)
386423Sgw25295 		return (NULL);
397147Staylor 	return (value);
406423Sgw25295 }
416423Sgw25295 
426423Sgw25295 void
spa_free_bootprop(char * value)437147Staylor spa_free_bootprop(char *value)
446423Sgw25295 {
457147Staylor 	ddi_prop_free(value);
466423Sgw25295 }
47