kobj_bootflags.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/bootconf.h>
#include <sys/kobj_impl.h>
#include <util/getoptstr.h>
/*
* Parse the boot line to determine boot flags.
*/
void
{
struct gos_params params;
char *cp;
int c;
boothowto |= RB_ASKNAME;
return;
}
cp = kern_bootargs;
/*
* name to the boot arguments. (And beware making it do so: if the
* run-kernel command returns, it will loop, and you will end up with
* multiple copies of the kernel name.)
*/
#endif
switch (c) {
case 'a':
boothowto |= RB_ASKNAME;
break;
case 'b':
boothowto |= RB_NOBOOTRC;
break;
case 'c':
break;
case 'd':
break;
case 'g':
break;
case 'G':
break;
case 'h':
break;
case 'i':
"Ignoring.\n");
} else {
}
break;
case 'k':
break;
case 'm':
"unix: -m argument too long. Ignoring.\n");
else {
}
break;
case 'O': {
if (++num_O_opt > (sizeof (kobj_kmdb_argv) /
sizeof (char *)) - 1) {
"options - ignoring option #%d.\n",
continue;
}
break;
}
case 'r':
boothowto |= RB_RECONFIG;
break;
case 's':
break;
case 'v':
boothowto |= RB_VERBOSE;
break;
case 'w':
boothowto |= RB_WRITABLE;
break;
case 'x':
break;
case '?':
switch (params.gos_last_opt) {
case 'i':
"for -i flag missing. Ignoring.\n");
break;
default:
"kernel option -%c.\n",
}
break;
default:
"option -%c.\n", c);
}
}
boothowto &= ~RB_DEBUGENTER;
}
/* Unused arguments. */
/*EMPTY*/
/* Lousy install arguments. Silently ignore. */
} else {
}
}
}