removed Fcall->mode == IXP_OAPPEND handling from writing to FsFtags

This commit is contained in:
Anselm R. Garbe 2006-03-06 21:18:45 +01:00
parent 8dcd780839
commit e63c6590db
1 changed files with 4 additions and 11 deletions

View File

@ -515,8 +515,7 @@ xopen(IXPConn *c, Fcall *fcall)
if(!m)
return Enofid;
if(!(fcall->mode | IXP_OREAD)
&& !((fcall->mode | IXP_OWRITE) || (fcall->mode | IXP_OAPPEND)))
if(!(fcall->mode | IXP_OREAD) && !(fcall->mode | IXP_OWRITE))
return Enomode;
fcall->id = ROPEN;
fcall->qid = m->qid;
@ -1099,16 +1098,10 @@ xwrite(IXPConn *c, Fcall *fcall)
break;
case FsFtags:
f = tag[i1]->area[i2]->frame[i3];
if(fcall->mode | IXP_OAPPEND) {
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))
if(fcall->count > sizeof(f->client->tags))
return "tags value too long";
memcpy(f->client->tags + i, fcall->data, fcall->count);
f->client->tags[fcall->count + i] = 0;
memcpy(f->client->tags, fcall->data, fcall->count);
f->client->tags[fcall->count] = 0;
update_ctags();
break;
case FsFgeom: