From fc97341f492be10f20e4c8a639614e0230d53471 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Sat, 30 Dec 2000 19:11:29 +0000 Subject: 2000-12-30 Marcus Brinkmann * dir.c: Include , , (diskfs_get_directs): Cast *data to struct dirent *. * node.c: Include . (diskfs_alloc_node): Remove unused variables err, st, np. (diskfs_free_node): Use *np->dn, not *dn to calculate used space. (recompute_blocks): Replace DT_DEV with DT_BLK. (diskfs_node_norefs): Likewise. (recompute_blocks): Take address of np->dn_stat for pointer st. (diskfs_cached_lookup): New variable st. (diskfs_cached_lookup): Set st to &np->dn_stat, not &dn->dn_stat. (create_symlink_hook): Fix malloc call and return code check. (read_symlink_hook): Return 0. * tmpfs.c: Include , , , , . (parse_opt): Reverse second and third argument of strtoimax call. * tmpfs.h (struct disknode): Remove blind passenger (unnamed copy of anonymous struct {} reg). Some of the above were also reported by Alexey Dejneka . --- tmpfs/dir.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tmpfs/dir.c') diff --git a/tmpfs/dir.c b/tmpfs/dir.c index 595e5437..92fa8e32 100644 --- a/tmpfs/dir.c +++ b/tmpfs/dir.c @@ -17,6 +17,10 @@ You should have received a copy of the GNU General Public License along with the GNU Hurd; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include +#include +#include + #include "tmpfs.h" #include @@ -66,7 +70,7 @@ diskfs_get_directs (struct node *dp, int entry, int n, return ENOMEM; } - entp = *data; + entp = (struct dirent *) *data; entp->d_fileno = dp->dn_stat.st_ino; entp->d_type = DT_DIR; entp->d_namlen = 1; @@ -146,7 +150,7 @@ diskfs_lookup_hard (struct node *dp, } if (namelen == 2 && name[0] == '.' && name[1] == '.') { - struct disknode *ddnp = dp->dn->dir.dotdot; + struct disknode *ddnp = dp->dn->u.dir.dotdot; assert (np != 0); if (ddnp == 0) /* root directory */ return EAGAIN; -- cgit v1.2.3