/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <sys/platnames.h>
#include <sys/boot_policy.h>
#include <sys/boot_redirect.h>
#include <sys/bootconf.h>
#include "boot_plat.h"
#include "ramdisk.h"
#define SUCCESS 0
#ifdef DEBUG
extern int debug = 0;
#else
static const int debug = 0;
#endif
extern char cmd_line_boot_archive[];
static int
{
return (-1);
dprintf("reading boot archive ...\n");
(void) printf("Error reading boot archive, bytes read = %ld, "
return (-1);
}
/* NOT REACHED */
return (0); /* to make cc happy */
}
static void
post_mountroot_nfs(void)
{
int fd;
char *fn;
for (;;) {
if (boothowto & RB_ASKNAME) {
/* Avoid buffer overrun */
if (ctmpname[0] != '\0') {
}
}
printf("Boot halted.\n");
}
} else if (cmd_line_boot_archive[0] != '\0') {
} else {
}
}
printf("Possible buffer overrun, "
"entering boot prompt\n");
}
else
printf("cannot open neither %s nor %s\n",
} else {
/*
* this function does not return if successful.
*/
(void) read_and_boot_ramdisk(fd);
printf("boot failed\n");
}
boothowto |= RB_ASKNAME;
}
}
/*
* bpath is the boot device path buffer.
* bargs is the boot arguments buffer.
*/
/*ARGSUSED*/
int
{
if (verbosemode) {
}
prom_panic("Could not mount filesystem.");
/*
* kernname (default-name) might have changed if mountroot() called
* boot_nfs_mountroot(), and it called set_default_filename().
*/
if (!user_specified_filename)
if (verbosemode)
return (1);
}