about summary refs log tree commit diff
path: root/sysdeps/mach
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-07-20 21:07:23 +0000
committerRoland McGrath <roland@gnu.org>1999-07-20 21:07:23 +0000
commit180c9ab7e35dfd7f3fc730594431999bd6befde3 (patch)
tree32b03bc0d31b81d54003979d0f699ad04a0db219 /sysdeps/mach
parent57d588608cf1f8b9c4455a3f285c6eba1f95bb14 (diff)
downloadglibc-180c9ab7e35dfd7f3fc730594431999bd6befde3.tar.gz
glibc-180c9ab7e35dfd7f3fc730594431999bd6befde3.tar.xz
glibc-180c9ab7e35dfd7f3fc730594431999bd6befde3.zip
1999-07-20 Mark Kettenis <kettenis@gnu.org>
	* sysdeps/mach/hurd/mmap.c (__mmap): Use correct arguments in
	__vm_allocate calls.

1999-07-20  Mark Kettenis  <kettenis@gnu.org>

	* sysdeps/mach/hurd/sysd-stdio.c (__stdio_read): Call
	_hurd_fd_read with new OFFSET argument set to -1.
	(__stdio_write): Call _hurd_fd_write with new OFFSET argument set
	to -1.

1999-07-17  Roland McGrath  <roland@baalperazim.frob.com>

	* hurd/hurdexec.c (_hurd_exec): Prune trailing null ports from the
	descriptor table sent in the RPC.
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/hurd/mmap.c5
-rw-r--r--sysdeps/mach/hurd/sysd-stdio.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c
index 403678af9c..0e6a6e09f3 100644
--- a/sysdeps/mach/hurd/mmap.c
+++ b/sysdeps/mach/hurd/mmap.c
@@ -46,7 +46,8 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
       && prot == (PROT_READ|PROT_WRITE)) /* cf VM_PROT_DEFAULT */
     {
       /* vm_allocate has (a little) less overhead in the kernel too.  */
-      err = __vm_allocate (&mapaddr, len, !(flags & MAP_FIXED));
+      err = __vm_allocate (__mach_task_self (), &mapaddr, len,
+			   !(flags & MAP_FIXED));
 
       if (err == KERN_NO_SPACE && (flags & MAP_FIXED))
 	{
@@ -54,7 +55,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
 	  /* The region is already allocated; deallocate it first.  */
 	  err = __vm_deallocate (__mach_task_self (), mapaddr, len);
 	  if (!err)
-	    err = __vm_allocate (&mapaddr, len, 0);
+	    err = __vm_allocate (__mach_task_self (), &mapaddr, len, 0);
 	}
 
       return err ? (__ptr_t) (long int) __hurd_fail (err) : (__ptr_t) mapaddr;
diff --git a/sysdeps/mach/hurd/sysd-stdio.c b/sysdeps/mach/hurd/sysd-stdio.c
index d12804a4a0..fea9b56a96 100644
--- a/sysdeps/mach/hurd/sysd-stdio.c
+++ b/sysdeps/mach/hurd/sysd-stdio.c
@@ -61,7 +61,7 @@ __stdio_read (cookie, buf, n)
   if (! fd)
     return __hurd_fail (EBADF);
 
-  if (err = _hurd_fd_read (fd, buf, &n))
+  if (err = _hurd_fd_read (fd, buf, &n, -1))
     return fd_fail (fd, err);
 
   return n;
@@ -86,7 +86,7 @@ __stdio_write (cookie, buf, n)
   do
     {
       wrote = nleft;
-      if (err = _hurd_fd_write (fd, buf, &wrote))
+      if (err = _hurd_fd_write (fd, buf, &wrote, -1))
 	return fd_fail (fd, err);
       buf += wrote;
       nleft -= wrote;