diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-11-15 16:43:35 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-11-15 16:43:35 +0100 |
commit | df829e6c07ddc515fa6c00e4baa888dfaecbd26d (patch) | |
tree | ad203af66897546e81293ab4e21df305458c1936 /sys/src/cmd/hjfs/auth.c | |
parent | 7ced300071e59a22a8afddee2a4bb242987ea214 (diff) |
hjfs: fix more missing dirty marks, error handling, cleanup
Diffstat (limited to 'sys/src/cmd/hjfs/auth.c')
-rw-r--r-- | sys/src/cmd/hjfs/auth.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/src/cmd/hjfs/auth.c b/sys/src/cmd/hjfs/auth.c index fbc5574d5..fc2e41dca 100644 --- a/sys/src/cmd/hjfs/auth.c +++ b/sys/src/cmd/hjfs/auth.c @@ -397,22 +397,22 @@ createuserdir(Fs *fs, char *name, short uid) c = getbuf(ch->fs->d, f.blk, TDENTRY, 0); if(c == nil) goto direrr2; + c->op |= BDELWRI; d = &c->de[f.deind]; - memset(d, 0, sizeof(Dentry)); - strncpy(d->name, name, NAMELEN - 1); - d->uid = uid; - d->muid = uid; - d->gid = uid; - d->mode = DALLOC | 0775; + memset(d, 0, sizeof(*d)); if(newqid(fs, &d->path) < 0){ direrr3: putbuf(c); goto direrr2; } + strncpy(d->name, name, NAMELEN - 1); + d->uid = uid; + d->muid = uid; + d->gid = uid; + d->mode = DALLOC | 0775; d->type = QTDIR; d->atime = time(0); d->mtime = d->atime; - c->op |= BDELWRI; goto direrr3; } |