summaryrefslogtreecommitdiff
path: root/tmpfs
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-06-11 21:40:50 +0000
committerRoland McGrath <roland@gnu.org>2002-06-11 21:40:50 +0000
commit6814a9338d1211625964ca3a702cd38e8708bc6f (patch)
treeac8e08525b76456e43d04cdac815878057a8461e /tmpfs
parent0393dca401038f070914450f27574baba9f7afe1 (diff)
2002-06-08 Roland McGrath <roland@frob.com>
* node.c (diskfs_cached_lookup): Use ino_t for argument. * node.c (diskfs_alloc_node): Case to uintptr_t before ino_t. (diskfs_cached_lookup): Likewise, and vice versa. * dir.c (diskfs_get_directs, diskfs_lookup_hard): Likewise.
Diffstat (limited to 'tmpfs')
-rw-r--r--tmpfs/dir.c6
-rw-r--r--tmpfs/node.c10
2 files changed, 8 insertions, 8 deletions
diff --git a/tmpfs/dir.c b/tmpfs/dir.c
index 5b63dbd5..1a93cdda 100644
--- a/tmpfs/dir.c
+++ b/tmpfs/dir.c
@@ -95,7 +95,7 @@ diskfs_get_directs (struct node *dp, int entry, int n,
entp->d_fileno = 2;
}
else
- entp->d_fileno = (ino_t) dp->dn->u.dir.dotdot;
+ entp->d_fileno = (ino_t) (uintptr_t) dp->dn->u.dir.dotdot;
entp->d_type = DT_DIR;
entp->d_namlen = 2;
entp->d_name[0] = '.';
@@ -123,7 +123,7 @@ diskfs_get_directs (struct node *dp, int entry, int n,
size_t rlen = (offsetof (struct dirent, d_name[1]) + d->namelen + 7) & ~7;
if (rlen + (char *) entp - *data > bufsiz || (n >= 0 && i > n))
break;
- entp->d_fileno = (ino_t) d->dn;
+ entp->d_fileno = (ino_t) (uintptr_t) d->dn;
entp->d_type = DT_UNKNOWN;
entp->d_namlen = d->namelen;
memcpy (entp->d_name, d->name, d->namelen + 1);
@@ -220,7 +220,7 @@ diskfs_lookup_hard (struct node *dp,
ds->prevp = prevp;
if (np)
- return diskfs_cached_lookup ((ino_t) d->dn, np);
+ return diskfs_cached_lookup ((ino_t) (uintptr_t) d->dn, np);
else
return 0;
}
diff --git a/tmpfs/node.c b/tmpfs/node.c
index 4e0d0d53..fd6bd722 100644
--- a/tmpfs/node.c
+++ b/tmpfs/node.c
@@ -52,7 +52,7 @@ diskfs_alloc_node (struct node *dp, mode_t mode, struct node **npp)
spin_unlock (&diskfs_node_refcnt_lock);
dn->type = IFTODT (mode & S_IFMT);
- return diskfs_cached_lookup ((ino_t) dn, npp);
+ return diskfs_cached_lookup ((ino_t) (uintptr_t) dn, npp);
}
void
@@ -154,9 +154,9 @@ recompute_blocks (struct node *np)
/* Fetch inode INUM, set *NPP to the node structure;
gain one user reference and lock the node. */
error_t
-diskfs_cached_lookup (int inum, struct node **npp)
+diskfs_cached_lookup (ino_t inum, struct node **npp)
{
- struct disknode *dn = (void *) inum;
+ struct disknode *dn = (void *) (uintptr_t) inum;
struct node *np;
assert (npp);
@@ -175,7 +175,7 @@ diskfs_cached_lookup (int inum, struct node **npp)
struct stat *st;
np = diskfs_make_node (dn);
- np->cache_id = (ino_t) dn;
+ np->cache_id = (ino_t) (uintptr_t) dn;
spin_lock (&diskfs_node_refcnt_lock);
dn->hnext = all_nodes;
@@ -191,7 +191,7 @@ diskfs_cached_lookup (int inum, struct node **npp)
st->st_fsid = getpid ();
st->st_blksize = vm_page_size;
- st->st_ino = (ino_t) dn;
+ st->st_ino = (ino_t) (uintptr_t) dn;
st->st_gen = dn->gen;
st->st_size = dn->size;