- stevesk@cvs.openbsd.org 2002/05/28 16:45:27
[monitor_mm.c]
print strerror(errno) on mmap/munmap error; ok markus@
diff --git a/ChangeLog b/ChangeLog
index 943f687..a9bf773 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,9 @@
- stevesk@cvs.openbsd.org 2002/05/26 20:35:10
[ssh.1]
sort ChallengeResponseAuthentication; ok markus@
+ - stevesk@cvs.openbsd.org 2002/05/28 16:45:27
+ [monitor_mm.c]
+ print strerror(errno) on mmap/munmap error; ok markus@
20020604
- (stevesk) [channels.c] bug #164 patch from YOSHIFUJI Hideaki (changed
@@ -722,4 +725,4 @@
- (stevesk) entropy.c: typo in debug message
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
-$Id: ChangeLog,v 1.2154 2002/06/06 20:30:28 mouring Exp $
+$Id: ChangeLog,v 1.2155 2002/06/06 20:33:06 mouring Exp $
diff --git a/monitor_mm.c b/monitor_mm.c
index 993925e..17b319c 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 @@
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 @@
#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__);