remove searching print; check fids in use; handle addr correctly again
This commit is contained in:
parent
c91cfa9177
commit
07494878dc
3 changed files with 23 additions and 4 deletions
|
|
@ -138,7 +138,6 @@ regexp(uint showerr, Text *t, Range lim, Range r, Rune *pat, int dir, int *found
|
||||||
q = Infinity;
|
q = Infinity;
|
||||||
else
|
else
|
||||||
q = lim.q1;
|
q = lim.q1;
|
||||||
warning(nil, "searching %d-%d\n", r.q1, q);
|
|
||||||
found = rxexecute(t, nil, r.q1, q, &sel);
|
found = rxexecute(t, nil, r.q1, q, &sel);
|
||||||
}
|
}
|
||||||
if(!found && showerr)
|
if(!found && showerr)
|
||||||
|
|
|
||||||
|
|
@ -160,10 +160,24 @@ fsysproc(void *v)
|
||||||
if(fcall[x->fcall.type] == 0)
|
if(fcall[x->fcall.type] == 0)
|
||||||
x = respond(x, &t, "bad fcall type");
|
x = respond(x, &t, "bad fcall type");
|
||||||
else{
|
else{
|
||||||
if(x->fcall.type==Tversion || x->fcall.type==Tauth)
|
switch(x->fcall.type){
|
||||||
|
case Tversion:
|
||||||
|
case Tauth:
|
||||||
|
case Tflush:
|
||||||
f = nil;
|
f = nil;
|
||||||
else
|
break;
|
||||||
|
case Tattach:
|
||||||
f = newfid(x->fcall.fid);
|
f = newfid(x->fcall.fid);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
f = newfid(x->fcall.fid);
|
||||||
|
if(!f->busy){
|
||||||
|
x->f = f;
|
||||||
|
x = respond(x, &t, "fid not in use");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
x->f = f;
|
x->f = f;
|
||||||
x = (*fcall[x->fcall.type])(x, f);
|
x = (*fcall[x->fcall.type])(x, f);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,8 +103,14 @@ xfidopen(Xfid *x)
|
||||||
q = FILE(x->f->qid);
|
q = FILE(x->f->qid);
|
||||||
switch(q){
|
switch(q){
|
||||||
case QWaddr:
|
case QWaddr:
|
||||||
|
if(w->nopen[q]++ == 0){
|
||||||
|
w->addr = range(0, 0);
|
||||||
|
w->limit = range(-1,-1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case QWdata:
|
||||||
|
case QWxdata:
|
||||||
w->nopen[q]++;
|
w->nopen[q]++;
|
||||||
w->limit = range(-1,-1);
|
|
||||||
break;
|
break;
|
||||||
case QWevent:
|
case QWevent:
|
||||||
if(w->nopen[q]++ == 0){
|
if(w->nopen[q]++ == 0){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue