summaryrefslogtreecommitdiff
path: root/monitor_mm.c
diff options
context:
space:
mode:
authormouring <mouring>2002-06-06 20:33:06 +0000
committermouring <mouring>2002-06-06 20:33:06 +0000
commitade5da300b15e41c04333f98fb20b57682f1246a (patch)
treee4998b8d9eb7c0f64c361841a7613c394e08ba61 /monitor_mm.c
parent721969fd0b965ef3785e2d7408c9da963e392620 (diff)
downloadopenssh-ade5da300b15e41c04333f98fb20b57682f1246a.tar.gz
- stevesk@cvs.openbsd.org 2002/05/28 16:45:27
[monitor_mm.c] print strerror(errno) on mmap/munmap error; ok markus@
Diffstat (limited to 'monitor_mm.c')
-rw-r--r--monitor_mm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/monitor_mm.c b/monitor_mm.c
index 993925e4..17b319cc 100644
--- a/monitor_mm.c
+++ b/monitor_mm.c
@@ -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.5 2002/05/28 16:45:27 stevesk Exp $");
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
@@ -88,7 +88,7 @@ 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(errnor));
#else
fatal("%s: UsePrivilegeSeparation=yes not supported",
__FUNCTION__);
@@ -132,7 +132,8 @@ 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__);