Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/mach In mach_msg_error, don't display error messa...
details: https://anonhg.NetBSD.org/src/rev/cb692307830f
branches: trunk
changeset: 556201:cb692307830f
user: manu <manu%NetBSD.org@localhost>
date: Tue Dec 09 17:10:02 2003 +0000
description:
In mach_msg_error, don't display error message when the error
is 0 (no error). This function is often used as a shortcut to
return a short message with retval = 0.
Add error codes to the debug display
diffstat:
sys/compat/mach/mach_errno.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (41 lines):
diff -r c8d83f291bf9 -r cb692307830f sys/compat/mach/mach_errno.c
--- a/sys/compat/mach/mach_errno.c Tue Dec 09 16:00:40 2003 +0000
+++ b/sys/compat/mach/mach_errno.c Tue Dec 09 17:10:02 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mach_errno.c,v 1.13 2003/12/09 11:29:01 manu Exp $ */
+/* $NetBSD: mach_errno.c,v 1.14 2003/12/09 17:10:02 manu Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mach_errno.c,v 1.13 2003/12/09 11:29:01 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mach_errno.c,v 1.14 2003/12/09 17:10:02 manu Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@@ -155,7 +155,9 @@
mach_set_trailer(rep, *msglen);
#ifdef DEBUG_MACH
- printf("failure in kernel handler for msg id %d\n", req->msgh_id);
+ if (error != 0)
+ printf("failure in kernel service %d (err %x, native %d)\n",
+ req->msgh_id, (int)rep->rep_retval, error);
#endif
return 0;
}
@@ -174,6 +176,11 @@
rep->rep_retval = error;
+#ifdef DEBUG_MACH
+ if (error != 0)
+ printf("failure in kernel service %d (Mach err %x)\n",
+ req->msgh_id, error);
+#endif
mach_set_trailer(rep, *msglen);
return 0;
Home |
Main Index |
Thread Index |
Old Index