spa_boot.c revision e7cbe64f7a72dae5cb44f100db60ca88f3313c65
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/bootconf.h>
char *
{
int proplen;
char *zfs_bp;
if (proplen == 0)
return (NULL);
return (NULL);
}
return (zfs_bp);
}
void
spa_free_bootfs(char *bootfs)
{
}
/*
* Given the boot device physpath, check if the device is in a valid state.
* If so, return the configuration from the vdev label.
*/
int
{
char *type;
return (EINVAL);
&nvtop) == 0);
if (spa_rootdev_validate(nvtop))
goto out;
else
return (EINVAL);
}
/*
* Go thru vdevs in the mirror to see if the given device (devpath)
* is in a healthy state. Also check if the given device has the most
* recent txg. Only the device with the most recent txg has valid
* information and can be booted.
*/
for (c = 0; c < children; c++) {
char *physpath;
&physpath) != 0)
return (EINVAL);
if (!spa_rootdev_validate(child[c]))
return (EINVAL);
} else {
/* get dev with the highest txg */
if (spa_rootdev_validate(child[c])) {
}
}
}
/* Does the given device have the most recent txg? */
return (EINVAL);
out:
return (0);
}