summaryrefslogtreecommitdiff
path: root/sys/src/boot
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@centraldogma>2011-11-09 15:26:26 +0100
committercinap_lenrek <cinap_lenrek@centraldogma>2011-11-09 15:26:26 +0100
commita4a3f519a6fea74d6bfc3c60a443fe2feb763e21 (patch)
tree0840bd1869212e8e3f42bc6142c7ec16d1bea10c /sys/src/boot
parent29c9eb1c211b7eb9f75488aace487976297499f4 (diff)
9boot: add wait word
Diffstat (limited to 'sys/src/boot')
-rw-r--r--sys/src/boot/pc/mkfile5
-rw-r--r--sys/src/boot/pc/sub.c13
2 files changed, 13 insertions, 5 deletions
diff --git a/sys/src/boot/pc/mkfile b/sys/src/boot/pc/mkfile
index 779490520..3ef82e159 100644
--- a/sys/src/boot/pc/mkfile
+++ b/sys/src/boot/pc/mkfile
@@ -55,10 +55,11 @@ test.iso: 9bootiso
rm -fr tmp $target
mkdir tmp
mkdir tmp/386
+ mkdir tmp/cfg
cp 9bootiso tmp/386
cp /386/9pcf tmp/386
- mkdir tmp/cfg
- echo 'bootfile=/386/9pcf' >tmp/cfg/plan9.ini
+ cp /sys/lib/dist/cfg/plan9.ini tmp/cfg/plan9.ini
+ echo wait >>tmp/cfg/plan9.ini
disk/mk9660 -B 386/9bootiso -p /sys/lib/sysconfig/proto/allproto -s tmp $target
rm -fr tmp
diff --git a/sys/src/boot/pc/sub.c b/sys/src/boot/pc/sub.c
index 5087ffc08..8140508dc 100644
--- a/sys/src/boot/pc/sub.c
+++ b/sys/src/boot/pc/sub.c
@@ -189,10 +189,11 @@ char*
configure(void *f, char *path)
{
char line[64], *kern, *s, *p;
- int inblock, n;
+ int inblock, nowait, n;
Clear:
kern = 0;
+ nowait = 1;
inblock = 0;
memset(BOOTLINE, 0, BOOTLINELEN);
@@ -209,8 +210,14 @@ Loop:
inblock = memcmp("[common]", line, 8);
continue;
}
- if(!memcmp("boot", line, 5))
+ if(!memcmp("boot", line, 5)){
+ nowait=1;
break;
+ }
+ if(!memcmp("wait", line, 5)){
+ nowait=0;
+ continue;
+ }
if(!memcmp("clear", line, 5)){
if(line[5] == 0){
print("ok");
@@ -249,7 +256,7 @@ Loop:
close(f);
f = 0;
- if(kern && timeout(1000))
+ if(kern && (nowait==0 || timeout(1000)))
goto Loop;
}