/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <meta.h>
#include <limits.h>
#include <svm.h>
/*
* FUNCTION: valid_bootlist
*
* INPUT: file pointer, line buffer, line_length
*
* RETURN VALUES:
* 0 - SUCCESS
* -1 - FAIL
*
*/
int
{
char *line;
/*
* errno may not be cleared by callee routines and we
* we want to catch fgets failures hence errno is reset.
*/
errno = 0;
return (RET_ERROR);
/* if not commented out then breakout */
break;
}
}
}
return (RET_ERROR);
return (RET_SUCCESS);
}
/*
* FUNCTION: svm_check
* Check the existance of DiskSuite or SVM
*
* INPUT: rootpath
*
* RETURN VALUES:
* 0 - SUCCESS
* -1 - FAIL
*/
int
{
int rval;
goto free_exit;
}
debug_printf("svm_check(): valid bootlist in %s. status %d\n",
if (rval == RET_SUCCESS) {
goto free_exit;
}
goto free_exit;
}
debug_printf("svm_check(): valid bootlist in %s. status %d\n",
if (rval > 0)
return (rval);
}
/*
* FUNCTION: svm_is_md
* Check if the the given device name has an md driver.
*
* RETURN:
* 1 - if it is a metadevice.
* 0 - if it is not a metadevice.
*/
int
{
int rval = 0;
return (RET_ERROR);
debug_printf("svm_is_md(): device get_drv_name failed: %s\n",
return (0);
}
rval = 1;
}
return (rval);
}