]> andersk Git - gssapi-openssh.git/blobdiff - openssh/monitor_mm.c
Import of OpenSSH 3.3p1
[gssapi-openssh.git] / openssh / monitor_mm.c
index 993925e482e2affb94e01ba1857cff93e8d4c3d1..0076c4210d7972ba2a93250f192830972822b4b6 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: monitor_mm.c,v 1.4 2002/03/25 20:12:10 stevesk Exp $");
+RCSID("$OpenBSD: monitor_mm.c,v 1.6 2002/06/04 23:05:49 markus Exp $");
 
 #ifdef HAVE_SYS_MMAN_H
 #include <sys/mman.h>
@@ -88,10 +88,10 @@ mm_create(struct mm_master *mmalloc, size_t size)
        address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED,
            -1, 0);
        if (address == MAP_FAILED)
-               fatal("mmap(%lu)", (u_long)size);
+               fatal("mmap(%lu): %s", (u_long)size, strerror(errno));
 #else
        fatal("%s: UsePrivilegeSeparation=yes not supported",
-           __FUNCTION__);
+           __func__);
 #endif
 
        mm->address = address;
@@ -132,10 +132,11 @@ mm_destroy(struct mm_master *mm)
 
 #ifdef HAVE_MMAP
        if (munmap(mm->address, mm->size) == -1)
-               fatal("munmap(%p, %lu)", mm->address, (u_long)mm->size);
+               fatal("munmap(%p, %lu): %s", mm->address, (u_long)mm->size,
+                   strerror(errno));
 #else
        fatal("%s: UsePrivilegeSeparation=yes not supported",
-           __FUNCTION__);
+           __func__);
 #endif
        if (mm->mmalloc == NULL)
                xfree(mm);
@@ -150,7 +151,7 @@ mm_xmalloc(struct mm_master *mm, size_t size)
 
        address = mm_malloc(mm, size);
        if (address == NULL)
-               fatal("%s: mm_malloc(%lu)", __FUNCTION__, (u_long)size);
+               fatal("%s: mm_malloc(%lu)", __func__, (u_long)size);
        return (address);
 }
 
@@ -299,7 +300,7 @@ mm_share_sync(struct mm_master **pmm, struct mm_master **pmmalloc)
        struct mm_master *mmold;
        struct mmtree rb_free, rb_allocated;
 
-       debug3("%s: Share sync", __FUNCTION__);
+       debug3("%s: Share sync", __func__);
 
        mm = *pmm;
        mmold = mm->mmalloc;
@@ -324,7 +325,7 @@ mm_share_sync(struct mm_master **pmm, struct mm_master **pmmalloc)
        *pmm = mm;
        *pmmalloc = mmalloc;
 
-       debug3("%s: Share sync end", __FUNCTION__);
+       debug3("%s: Share sync end", __func__);
 }
 
 void
This page took 0.044775 seconds and 4 git commands to generate.