diff options
author | Stefan Kempf <stefan@cvs.openbsd.org> | 2016-03-04 15:34:15 +0000 |
---|---|---|
committer | Stefan Kempf <stefan@cvs.openbsd.org> | 2016-03-04 15:34:15 +0000 |
commit | 7095a2c2b3f16d230607cc664d3411e05bc1c5fa (patch) | |
tree | 6b9d21ce0d1f825415b5a9ffe6ffb875a7459917 /usr.sbin | |
parent | 7ce0bb7cf74018bb6fb6a3976241022ce3504149 (diff) |
Set root device to sd0a, instead of wd0a. Virtio devices show up
as sd. Original diff from Patrick Wildt.
In addition, using the MAKEBOOTDEV macro no longer makes bsd
ask for the root disk on VM boot.
ok mlarkin@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/vmd/loadfile_elf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/vmd/loadfile_elf.c b/usr.sbin/vmd/loadfile_elf.c index 6f93d50bed4..069677d3059 100644 --- a/usr.sbin/vmd/loadfile_elf.c +++ b/usr.sbin/vmd/loadfile_elf.c @@ -1,5 +1,5 @@ /* $NetBSD: loadfile.c,v 1.10 2000/12/03 02:53:04 tsutsui Exp $ */ -/* $OpenBSD: loadfile_elf.c,v 1.9 2016/01/16 08:55:40 stefan Exp $ */ +/* $OpenBSD: loadfile_elf.c,v 1.10 2016/03/04 15:34:14 stefan Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -93,6 +93,7 @@ #include <stddef.h> #include <sys/param.h> +#include <sys/reboot.h> #include <sys/exec.h> #include <sys/exec_elf.h> @@ -347,7 +348,7 @@ push_stack(int mem_sz, uint32_t end) stack[--loc] = mem_sz * 1024 - LOWMEM_KB; stack[--loc] = end; stack[--loc] = 0x0e; - stack[--loc] = 0x0; + stack[--loc] = MAKEBOOTDEV(0x4, 0, 0, 0, 0); /* bootdev: sd0a */ stack[--loc] = 0x0; write_mem(STACK_PAGE, &stack, PAGE_SIZE, 1); |