/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* change metadevice parameters
*/
#include <meta.h>
#include <sdssc.h>
/*
* print usage message
*/
static void
int eval
)
{
%s [-s setname] [options] mirror\n\
\n\
-h hotspare_pool | \"none\"\n\
\n\
Mirror options:\n\
-r roundrobin | geometric | first\n\
-w parallel | serial\n\
}
/*
* do mirror parameters
*/
static int
int argc,
char *argv[],
)
{
int modified = 0;
int c;
/* we must have a set */
/* initialize */
/* reset and parse args */
optind = 1;
opterr = 1;
switch (c) {
case 's':
break;
case 'r':
return (-1);
}
modified = 1;
break;
case 'w':
return (-1);
}
modified = 1;
break;
case 'p':
return (-1);
}
modified = 1;
break;
default:
/*NOTREACHED*/
break;
}
}
if (argc != 1)
/* if just printing */
if (! modified) {
return (-1);
(void) printf(
"%s: Mirror current parameters are:\n"),
return (-1);
}
}
/* otherwise, change parameters */
else {
return (-1);
/* update md.cf */
return (-1);
}
/* return success */
return (0);
}
/*
* do stripe parameters
*/
static int
int argc,
char *argv[],
)
{
int modified = 0;
int c;
/* we must have a set */
/* initialize */
/* reset and parse args */
optind = 1;
opterr = 1;
switch (c) {
case 's':
break;
case 'h':
if (meta_is_none(optarg)) {
return (-1);
return (-1);
} else {
}
modified = 1;
break;
default:
/*NOTREACHED*/
break;
}
}
if (argc != 1)
/* if just printing */
if (! modified) {
return (-1);
return (-1);
return (-1);
}
/* otherwise, change parameters */
else {
return (-1);
/* update md.cf */
return (-1);
}
/* return success */
return (0);
}
/*
* do raid parameters
*/
static int
int argc,
char *argv[],
)
{
int modified = 0;
int c;
/* we must have a set */
/* initialize */
/* reset and parse args */
optind = 1;
opterr = 1;
switch (c) {
case 's':
break;
case 'h':
if (meta_is_none(optarg)) {
return (-1);
return (-1);
} else {
}
modified = 1;
break;
default:
/*NOTREACHED*/
break;
}
}
if (argc != 1)
/* if just printing */
if (! modified) {
return (-1);
return (-1);
"%s: RAID current parameters are:\n"),
return (-1);
}
/* otherwise, change parameters */
else {
return (-1);
/* update md.cf */
return (-1);
}
/* return success */
return (0);
}
/*
* parse args and doit
*/
int
main(
int argc,
char **argv
)
{
char *miscname;
int c;
int error;
char *cp;
/*
* Get the locale set up before calling any other routines
* with messages to ouput. Just in case we're not in a build
* environment, make sure that TEXT_DOMAIN gets set to
* something.
*/
#if !defined(TEXT_DOMAIN)
#endif
(void) textdomain(TEXT_DOMAIN);
if (sdssc_bind_library() == SDSSC_OKAY)
&error) == SDSSC_PROXY_DONE)
} else {
}
/* initialize */
meta_check_root(ep) != 0) {
}
/* find set and metadevice first */
optind = 1;
opterr = 1;
switch (c) {
case 's':
break;
case 'h':
break;
case '?':
if (optopt == '?')
break;
}
}
}
}
if ((called_thru_rpc == FALSE) &&
/*
* If we are dealing with a MN set and we were not
* called thru an rpc call, we are just to send this
* command string to the master of the set and let it
* deal with it.
* Note that if sp is NULL, meta_is_mn_name() derives sp
* from firstarg which is the metadevice arg
* If this fails, the master must panic as the mddb may be
* inconsistent
*/
int result;
/* No further action required */
}
}
/* grab set lock */
}
}
}
/* dispatch based on device type */
}
}
}
} else {
"%s: invalid metadevice type %s\n"),
}
/* return success */
/*NOTREACHED*/
return (0);
}