]> granicus.if.org Git - strace/blobdiff - mem.c
Fix decoding and dumping of readv syscall in case of short read
[strace] / mem.c
diff --git a/mem.c b/mem.c
index ca6407f1c1a32ec6b8b4c2981a97f570131d4a98..37c7daba88dfc3b7ef322a25bc6d3e5291bcc4bd 100644 (file)
--- a/mem.c
+++ b/mem.c
@@ -247,6 +247,17 @@ SYS_FUNC(msync)
        return RVAL_DECODED;
 }
 
+#include "xlat/mlock_flags.h"
+
+SYS_FUNC(mlock2)
+{
+       printaddr(tcp->u_arg[0]);
+       tprintf(", %lu, ", tcp->u_arg[1]);
+       printflags(mlock_flags, tcp->u_arg[2], "MLOCK_???");
+
+       return RVAL_DECODED;
+}
+
 SYS_FUNC(mincore)
 {
        if (entering(tcp)) {
@@ -277,12 +288,11 @@ SYS_FUNC(mincore)
        return 0;
 }
 
-#if defined(ALPHA) || defined(IA64) || defined(SPARC) || defined(SPARC64)
+#if defined ALPHA || defined IA64 || defined M68K \
+ || defined SPARC || defined SPARC64
 SYS_FUNC(getpagesize)
 {
-       if (exiting(tcp))
-               return RVAL_HEX;
-       return 0;
+       return RVAL_DECODED | RVAL_HEX;
 }
 #endif