[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/8] ipc: use the name of the task for error messages
From: |
Justus Winter |
Subject: |
[PATCH 4/8] ipc: use the name of the task for error messages |
Date: |
Sat, 1 Feb 2014 15:09:24 +0100 |
* ipc/mach_port.c (mach_port_destroy): Use the name of the task for
error messages.
(mach_port_deallocate): Likewise.
---
ipc/mach_port.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ipc/mach_port.c b/ipc/mach_port.c
index fbc5e69..13572a1 100644
--- a/ipc/mach_port.c
+++ b/ipc/mach_port.c
@@ -571,7 +571,7 @@ mach_port_destroy(
kr = ipc_right_lookup_write(space, name, &entry);
if (kr != KERN_SUCCESS) {
if (name != MACH_PORT_NULL && name != MACH_PORT_DEAD && space
== current_space()) {
- printf("task %p destroying an invalid port %lu, most
probably a bug.\n", current_task(), name);
+ printf("task %.*s destroying an invalid port %lu, most
probably a bug.\n", sizeof current_task()->name, current_task()->name, name);
if (mach_port_deallocate_debug)
SoftDebugger("mach_port_deallocate");
}
@@ -615,7 +615,7 @@ mach_port_deallocate(
kr = ipc_right_lookup_write(space, name, &entry);
if (kr != KERN_SUCCESS) {
if (name != MACH_PORT_NULL && name != MACH_PORT_DEAD && space
== current_space()) {
- printf("task %p deallocating an invalid port %lu, most
probably a bug.\n", current_task(), name);
+ printf("task %.*s deallocating an invalid port %lu,
most probably a bug.\n", sizeof current_task()->name, current_task()->name,
name);
if (mach_port_deallocate_debug)
SoftDebugger("mach_port_deallocate");
}
--
1.8.5.2
- [PATCH 1/8] kern: fix printing of kmem_cache names, Justus Winter, 2014/02/01
- [PATCH 2/8] kern: add snprintf, Justus Winter, 2014/02/01
- [PATCH 4/8] ipc: use the name of the task for error messages,
Justus Winter <=
- [PATCH 3/8] kern: add a name field to struct task, Justus Winter, 2014/02/01
- [PATCH 7/8] include: add task_set_name, Justus Winter, 2014/02/01
- [PATCH 5/8] include: add a fixed-size string type for debugging purposes, Justus Winter, 2014/02/01
- [PATCH 6/8] kern: implement task_set_name, Justus Winter, 2014/02/01