diff options
author | Thomas Bushnell <thomas@gnu.org> | 1999-07-11 05:31:04 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1999-07-11 05:31:04 +0000 |
commit | 6e37ec7cf99f271884d1b7e5e6ebf61746be4847 (patch) | |
tree | 7ad6f039476fd6aeb350e697ba4891596acf5ff7 /login/utmp.c | |
parent | 344c50cb576d2c3922d90adb8baededc258dd599 (diff) |
1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
* utmp.c (return_data): Use mmap instead of vm_allocate.
Diffstat (limited to 'login/utmp.c')
-rw-r--r-- | login/utmp.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; |