diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-03-28 22:42:27 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-03-28 22:42:27 +0000 |
commit | 233efcba6a5d51d6435957d5b9de4b0f2ae1d6b3 (patch) | |
tree | 05fe81fbc59f7c8879fe1d58dbe3d3593b1f8879 /sys/arch/hppa/stand/cdboot/cdboot.c | |
parent | c20f96b578d6b516a8cae9ee716ea2d2cd5fde87 (diff) |
a small boot for a cd
Diffstat (limited to 'sys/arch/hppa/stand/cdboot/cdboot.c')
-rw-r--r-- | sys/arch/hppa/stand/cdboot/cdboot.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/sys/arch/hppa/stand/cdboot/cdboot.c b/sys/arch/hppa/stand/cdboot/cdboot.c new file mode 100644 index 00000000000..4855343fcd7 --- /dev/null +++ b/sys/arch/hppa/stand/cdboot/cdboot.c @@ -0,0 +1,54 @@ +/* $OpenBSD: cdboot.c,v 1.1 2003/03/28 22:42:26 mickey Exp $ */ + +/* + * Copyright (c) 2003 Michael Shalayeff + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Michael Shalayeff. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include <sys/param.h> +#include <sys/reboot.h> +#include <sys/stat.h> +#include <libsa.h> + +char kernel[] = "/bsd"; + +extern const char version[]; + +void +boot(bootdev) + dev_t bootdev; +{ + machdep(); + + printf(">> OpenBSD/" MACHINE " BOOT %s\n" + "booting %s: ", version, kernel); + + exec(kernel, (void *)DEFAULT_KERNEL_ADDRESS, 0); +} |