wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 775975476d5a037db1bc9bc3f7813cd7f24e894a
parent 85ebc411007d8b63f60fdb7990a1a8924dd6988c
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Wed, 22 Mar 2006 19:57:18 +0100

small fix in mkqid


Diffstat:
cmd/wm/fs.c | 18++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/cmd/wm/fs.c b/cmd/wm/fs.c @@ -391,20 +391,17 @@ mkqid(Qid *dir, char *wname, Qid *new) case FsFcolors: if((dir_i1 == -1) || (dir_type != FsDlabel)) return -1; - new->type = IXP_QTFILE; - new->path = mkqpath(type, qpath_i1id(dir->path), qpath_i2id(dir->path), qpath_i3id(dir->path)); + goto Mkfile; break; case FsFmode: if(dir_i1 == -1 || dir_i2 == -1 || dir_type != FsDarea) return -1; - new->type = IXP_QTFILE; - new->path = mkqpath(type, qpath_i1id(dir->path), qpath_i2id(dir->path), qpath_i3id(dir->path)); + goto Mkfile; break; case FsFtag: if(dir_i1 == -1 || dir_type != FsDws) return -1; - new->type = IXP_QTFILE; - new->path = mkqpath(type, qpath_i1id(dir->path), qpath_i2id(dir->path), qpath_i3id(dir->path)); + goto Mkfile; break; case FsFgeom: case FsFname: @@ -418,8 +415,12 @@ mkqid(Qid *dir, char *wname, Qid *new) return -1; else if((dir_type == FsDGclient) && (dir_i1 == -1)) return -1; - new->type = IXP_QTFILE; - new->path = mkqpath(type, qpath_i1id(dir->path), qpath_i2id(dir->path), qpath_i3id(dir->path)); + goto Mkfile; + break; + case FsFexpand: + if(dir_type != FsDbar) + return -1; + goto Mkfile; break; case FsFborder: case FsFfont: @@ -432,6 +433,7 @@ mkqid(Qid *dir, char *wname, Qid *new) return -1; case FsFctl: case FsFevent: +Mkfile: new->type = IXP_QTFILE; new->path = mkqpath(type, qpath_i1id(dir->path), qpath_i2id(dir->path), qpath_i3id(dir->path)); break;