mirror of https://github.com/0intro/wmii
removed Fcall->mode == IXP_OAPPEND handling from writing to FsFtags
This commit is contained in:
parent
8dcd780839
commit
e63c6590db
15
cmd/wm/fs.c
15
cmd/wm/fs.c
|
@ -515,8 +515,7 @@ xopen(IXPConn *c, Fcall *fcall)
|
||||||
|
|
||||||
if(!m)
|
if(!m)
|
||||||
return Enofid;
|
return Enofid;
|
||||||
if(!(fcall->mode | IXP_OREAD)
|
if(!(fcall->mode | IXP_OREAD) && !(fcall->mode | IXP_OWRITE))
|
||||||
&& !((fcall->mode | IXP_OWRITE) || (fcall->mode | IXP_OAPPEND)))
|
|
||||||
return Enomode;
|
return Enomode;
|
||||||
fcall->id = ROPEN;
|
fcall->id = ROPEN;
|
||||||
fcall->qid = m->qid;
|
fcall->qid = m->qid;
|
||||||
|
@ -1099,16 +1098,10 @@ xwrite(IXPConn *c, Fcall *fcall)
|
||||||
break;
|
break;
|
||||||
case FsFtags:
|
case FsFtags:
|
||||||
f = tag[i1]->area[i2]->frame[i3];
|
f = tag[i1]->area[i2]->frame[i3];
|
||||||
if(fcall->mode | IXP_OAPPEND) {
|
if(fcall->count > sizeof(f->client->tags))
|
||||||
cext_strlcat(f->client->tags, " ", sizeof(f->client->tags));
|
|
||||||
i = strlen(f->client->tags);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
i = 0;
|
|
||||||
if(fcall->count + i > sizeof(f->client->tags))
|
|
||||||
return "tags value too long";
|
return "tags value too long";
|
||||||
memcpy(f->client->tags + i, fcall->data, fcall->count);
|
memcpy(f->client->tags, fcall->data, fcall->count);
|
||||||
f->client->tags[fcall->count + i] = 0;
|
f->client->tags[fcall->count] = 0;
|
||||||
update_ctags();
|
update_ctags();
|
||||||
break;
|
break;
|
||||||
case FsFgeom:
|
case FsFgeom:
|
||||||
|
|
Loading…
Reference in New Issue