From d4ab0e458d903e0373e90c4d0459d1fddeb34b75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sat, 3 Feb 2007 17:00:12 +0000 Subject: [PATCH] Also strerror() for syscalls returning int (open, ...). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20059 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/strace/strace.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/strace/strace.cpp b/src/bin/strace/strace.cpp index a41587207e..7007a92f7c 100644 --- a/src/bin/strace/strace.cpp +++ b/src/bin/strace/strace.cpp @@ -367,7 +367,8 @@ print_syscall(FILE *outputFile, debug_post_syscall &message, // if the return type is status_t or ssize_t, print human-readable // error codes if (returnType->TypeName() == "status_t" - || returnType->TypeName() == "ssize_t" + || (returnType->TypeName() == "ssize_t" + || returnType->TypeName() == "int") && message.return_value < 0) { print_to_string(&string, &length, " %s", strerror(message.return_value)); }