diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2003-05-10 00:12:29 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2003-05-10 00:12:29 +0000 |
commit | e1a049e27ae81f2eac0d59fbdd221710ec2d8ab5 (patch) | |
tree | 7d4fc7257b6677fc3e5cd3c11b29edd4486e2242 /fatfs/dir.c | |
parent | 8e833469cbe0f6f2ba26d23f7e11540a75071e9d (diff) | |
download | hurd-e1a049e27ae81f2eac0d59fbdd221710ec2d8ab5.tar.gz hurd-e1a049e27ae81f2eac0d59fbdd221710ec2d8ab5.tar.bz2 hurd-e1a049e27ae81f2eac0d59fbdd221710ec2d8ab5.zip |
2003-04-26 Marco Gerards <metgerards@student.han.nl>
* dir.c (diskfs_get_directs): Consider ENTRY when adding
"." and ".." for the rootnode.
* inode.c (read_node): Use ifind instead of diskfs_cached_lookup
and do not use diskfs_nput anymore.
* main.c (diskfs_S_fsys_getfile): New function.
Diffstat (limited to 'fatfs/dir.c')
-rw-r--r-- | fatfs/dir.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/fatfs/dir.c b/fatfs/dir.c index 9ef76c49..0b4b4599 100644 --- a/fatfs/dir.c +++ b/fatfs/dir.c @@ -839,7 +839,7 @@ diskfs_get_directs (struct node *dp, filenames). */ if ((char)ep->name[0] == FAT_DIR_NAME_DELETED || (ep->attribute & FAT_DIR_ATTR_LABEL)) - i--; + i--; bufp = bufp + FAT_DIR_REC_LEN; } @@ -857,13 +857,10 @@ diskfs_get_directs (struct node *dp, /* The root directory in FAT file systems doesn't contain entries for DOT and DOTDOT, they are special cased below. */ - if (dp == diskfs_root_node && i < 2) - { - if (i == 0) - ep = ˙ - else - ep = &dotdot; - } + if (dp == diskfs_root_node && (i + entry == 0)) + ep = ˙ + else if (dp == diskfs_root_node && (i + entry == 1)) + ep = &dotdot; else ep = (struct dirrect *) bufp; @@ -931,7 +928,7 @@ diskfs_get_directs (struct node *dp, /* And move along. */ datap = datap + reclen; - if (!(dp == diskfs_root_node && i < 2)) + if (!(dp == diskfs_root_node && i + entry < 2)) bufp = bufp + FAT_DIR_REC_LEN; i++; } |