summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ftpfs/ChangeLog7
-rw-r--r--ftpfs/ccache.c11
-rw-r--r--ftpfs/netfs.c5
3 files changed, 13 insertions, 10 deletions
diff --git a/ftpfs/ChangeLog b/ftpfs/ChangeLog
index 22eb11ce..87195895 100644
--- a/ftpfs/ChangeLog
+++ b/ftpfs/ChangeLog
@@ -1,3 +1,10 @@
+1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
+
+ * ccache.c (ccache_read): Use munmap instead of vm_deallocate.
+ (ccache_invalidate): Likewise.
+ (ccache_free): Likewise.
+ * netfs.c (get_dirents): Likewise.
+
Sun Jan 31 18:33:55 1999 Thomas Bushnell, BSG <tb@mit.edu>
* netfs.c (netfs_attempt_utimes): Implement new possibility that
diff --git a/ftpfs/ccache.c b/ftpfs/ccache.c
index c942378a..98b568ae 100644
--- a/ftpfs/ccache.c
+++ b/ftpfs/ccache.c
@@ -1,6 +1,6 @@
/* Remote file contents caching
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
This file is part of the GNU Hurd.
@@ -126,9 +126,7 @@ ccache_read (struct ccache *cc, off_t offs, size_t len, void *data)
/* That worked; copy what's already-fetched. */
{
bcopy (cc->image, (void *)addr, cc->max);
- vm_deallocate (mach_task_self (),
- (vm_address_t)cc->image,
- cc->alloced);
+ munmap (cc->image, cc->alloced);
cc->image = (char *)addr;
}
}
@@ -227,8 +225,7 @@ ccache_invalidate (struct ccache *cc)
{
if (cc->alloced > 0)
{
- vm_deallocate (mach_task_self (),
- (vm_address_t)cc->image, cc->alloced);
+ munmap (cc->image, cc->alloced);
cc->image = 0;
cc->alloced = 0;
cc->max = 0;
@@ -277,7 +274,7 @@ void
ccache_free (struct ccache *cc)
{
if (cc->alloced > 0)
- vm_deallocate (mach_task_self (), (vm_address_t)cc->image, cc->alloced);
+ munmap (cc->image, cc->alloced);
if (cc->data_conn >= 0)
close (cc->data_conn);
if (cc->conn)
diff --git a/ftpfs/netfs.c b/ftpfs/netfs.c
index fb9a2ef6..f1f97bb1 100644
--- a/ftpfs/netfs.c
+++ b/ftpfs/netfs.c
@@ -225,14 +225,13 @@ get_dirents (struct ftpfs_dir *dir,
}
if (err)
- vm_deallocate (mach_task_self (), (vm_address_t)*data, size);
+ munmap (*data, size);
else
{
vm_address_t alloc_end = (vm_address_t)(*data + size);
vm_address_t real_end = round_page (p);
if (alloc_end > real_end)
- vm_deallocate (mach_task_self (),
- real_end, alloc_end - real_end);
+ munmap ((caddr_t) real_end, alloc_end - real_end);
*data_len = p - *data;
*data_entries = count;
}