@@ 509,6 509,8 @@ consread(Chan *c, void *buf, long n, ulong offset)
qunlock(&kbdq);
nexterror();
}
+ return getline((char*)buf, n);
+#ifdef asdf
while(!cangetc(&lineq)){
sleep(&kbdq.r, isbrkc, &kbdq);
do{
@@ 547,6 549,7 @@ consread(Chan *c, void *buf, long n, ulong offset)
*cbuf++ = ch;
--n;
}
+#endif asdf
poperror();
qunlock(&kbdq);
return i;
@@ 373,7 373,7 @@ sysexec(ulong *arg)
up->seg[SSEG] = s;
s->base = USTKTOP-USTKSIZE;
s->top = USTKTOP;
- relocateseg(s, TSTKTOP-USTKTOP);
+ relocateseg(s, USTKTOP-TSTKTOP);
close(tc);