summaryrefslogtreecommitdiff
path: root/login
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-07-11 05:31:04 +0000
committerThomas Bushnell <thomas@gnu.org>1999-07-11 05:31:04 +0000
commit6e37ec7cf99f271884d1b7e5e6ebf61746be4847 (patch)
tree7ad6f039476fd6aeb350e697ba4891596acf5ff7 /login
parent344c50cb576d2c3922d90adb8baededc258dd599 (diff)
1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
* utmp.c (return_data): Use mmap instead of vm_allocate.
Diffstat (limited to 'login')
-rw-r--r--login/ChangeLog4
-rw-r--r--login/utmp.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/login/ChangeLog b/login/ChangeLog
index 8bfdb3c1..80477012 100644
--- a/login/ChangeLog
+++ b/login/ChangeLog
@@ -1,3 +1,7 @@
+1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
+
+ * utmp.c (return_data): Use mmap instead of vm_allocate.
+
Mon Aug 21 16:35:34 1995 Miles Bader <miles@churchy.gnu.ai.mit.edu>
* utmp.c (trivfs_goaway, trivfs_modify_stat): Update arguments.
diff --git a/login/utmp.c b/login/utmp.c
index 4333fa92..37d17421 100644
--- a/login/utmp.c
+++ b/login/utmp.c
@@ -1,6 +1,6 @@
/* Login record (utmp) server.
- Copyright (C) 1995 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1999 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -271,9 +271,9 @@ return_data(char *data, int data_len, char **buf, int *buf_len)
{
if (data_len > *buf_len)
{
- error_t err = vm_allocate(mach_task_self(), buf, data_len, 1);
- if (err)
- return err;
+ *buf = mmap (0, data_len, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
+ if (*buf == (char *) -1))
+ return errno;
}
*buf_len = data_len;