diff options
author | aiju <devnull@localhost> | 2012-10-03 17:23:17 +0200 |
---|---|---|
committer | aiju <devnull@localhost> | 2012-10-03 17:23:17 +0200 |
commit | 2bcaa6be7e311b2cdfbdf64fa3dd78a42aec8614 (patch) | |
tree | 056c9f185f3a22862070bc080b08842984b4b364 /sys/src/cmd/hjfs | |
parent | cd7e78a97b14f706c0f406fd5d09f63a656fd247 (diff) |
fixed potential bug in hjfs
Diffstat (limited to 'sys/src/cmd/hjfs')
-rw-r--r-- | sys/src/cmd/hjfs/fs1.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/src/cmd/hjfs/fs1.c b/sys/src/cmd/hjfs/fs1.c index 7052b749a..e48e0aebb 100644 --- a/sys/src/cmd/hjfs/fs1.c +++ b/sys/src/cmd/hjfs/fs1.c @@ -482,7 +482,7 @@ dumpblk(Fs *fs, FLoc *, uvlong *l) /* * getblk returns the address of a block in a file * given its relative address blk - * the address and generation are returned in *r and *gen + * the address are returned in *r * mode has to be one of: * - GBREAD: this block will only be read * - GBWRITE: this block will be written, but don't create it @@ -493,7 +493,6 @@ dumpblk(Fs *fs, FLoc *, uvlong *l) * return value is 1 if the block existed, -1 on error * a return value of 0 means the block did not exist * this is only an error in case of GBREAD and GBWRITE - * gen == nil allowed */ int @@ -897,8 +896,10 @@ newentry(Fs *fs, Loc *l, Buf *b, char *name, FLoc *res) continue; if(rc == 0){ memset(c->de, 0, sizeof(c->de)); - if(i == d->size) + if(i == d->size){ d->size++; + b->op |= BDELWRI; + } } for(j = 0; j < DEPERBLK; j++){ if(si == -1 && (c->de[j].mode & DALLOC) == 0){ |