From a439e9fc84397a7a802b2e9966df6d2bf7a63e73 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Sun, 11 Jul 1999 05:28:45 +0000 Subject: 1999-07-09 Thomas Bushnell, BSG * boot-start.c (diskfs_S_exec_startup_get_info): Use mmap instead of vm_allocate. (diskfs_S_fsys_init): Likewise. * file-get-trans.c (diskfs_S_file_get_translator): Likewise. * file-getfh.c (diskfs_S_file_getfh): Likewise. * io-read.c (diskfs_S_io_read): Likewise. --- libdiskfs/file-get-trans.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'libdiskfs/file-get-trans.c') diff --git a/libdiskfs/file-get-trans.c b/libdiskfs/file-get-trans.c index 77be4e1a..118222be 100644 --- a/libdiskfs/file-get-trans.c +++ b/libdiskfs/file-get-trans.c @@ -44,7 +44,7 @@ diskfs_S_file_get_translator (struct protid *cred, int amt; assert (diskfs_shortcut_symlink); if (len > *translen) - vm_allocate (mach_task_self (), (vm_address_t *)trans, len, 1); + *trans = mmap (0, len, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0); bcopy (_HURD_SYMLINK, *trans, sizeof _HURD_SYMLINK); if (diskfs_read_symlink_hook) @@ -84,7 +84,7 @@ diskfs_S_file_get_translator (struct protid *cred, buflen++; /* terminating nul */ if (buflen > *translen) - vm_allocate (mach_task_self (), (vm_address_t *) trans, buflen, 1); + *trans = mmap (0, buflen, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0); bcopy (buf, *trans, buflen); free (buf); *translen = buflen; @@ -96,7 +96,7 @@ diskfs_S_file_get_translator (struct protid *cred, len = sizeof _HURD_FIFO; if (len > *translen) - vm_allocate (mach_task_self (), (vm_address_t *) trans, len, 1); + *trans = mmap (0, len, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0); bcopy (_HURD_FIFO, *trans, sizeof _HURD_FIFO); *translen = len; error = 0; @@ -107,7 +107,7 @@ diskfs_S_file_get_translator (struct protid *cred, len = sizeof _HURD_IFSOCK; if (len > *translen) - vm_allocate (mach_task_self (), (vm_address_t *) trans, len, 1); + *trans = mmap (0, len, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0); bcopy (_HURD_IFSOCK, *trans, sizeof _HURD_IFSOCK); *translen = len; error = 0; @@ -124,8 +124,7 @@ diskfs_S_file_get_translator (struct protid *cred, if (!error) { if (len > *translen) - vm_allocate (mach_task_self (), (vm_address_t *) trans, - len, 1); + *trans = mmap (0, len, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0); bcopy (string, *trans, len); *translen = len; free (string); -- cgit v1.2.3