diff options
author | kaashoek <kaashoek> | 2006-08-14 14:13:52 +0000 |
---|---|---|
committer | kaashoek <kaashoek> | 2006-08-14 14:13:52 +0000 |
commit | bdb66433031ca96f2fd127995186623cd10c45b3 (patch) | |
tree | 037ffd2021f27718fba32c27cacd9ca52682b613 /fs.c | |
parent | d15f0d1033a7da6448966d9626ec2776781e4188 (diff) | |
download | xv6-labs-bdb66433031ca96f2fd127995186623cd10c45b3.tar.gz xv6-labs-bdb66433031ca96f2fd127995186623cd10c45b3.tar.bz2 xv6-labs-bdb66433031ca96f2fd127995186623cd10c45b3.zip |
set size for directories correctly in wdir and mkfs
mkdir
ls shows stat info for each dir entry
Diffstat (limited to 'fs.c')
-rw-r--r-- | fs.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -355,7 +355,8 @@ writei(struct inode *ip, char *addr, uint off, uint n) } if (r > 0) { if (off > ip->size) { - ip->size = off; + if (ip->type == T_DIR) ip->size = ((off / BSIZE) + 1) * BSIZE; + else ip->size = off; } iupdate(ip); } |